(image, output_file, save_format='jpeg')
Saves an image to disk.

  Args:
    image: 3-D numpy array of shape [image_size, image_size, 3] and dtype
        float32, with values in [0, 1].
    output_file: str, output file.
    save_format: format for saving image (eg. jpeg).
Saves an image to disk.
Saves an image to disk .
def save_np_image(image, output_file, save_format='jpeg'):
  """Saves an image to disk.

  Args:
    image: 3-D numpy array of shape [image_size, image_size, 3] and dtype
        float32, with values in [0, 1].
    output_file: str, output file.
    save_format: format for saving image (eg. jpeg).
  """
  image = np.uint8(image * 255.0)
  buf = io.BytesIO()
  skimage.io.imsave(buf, np.squeeze(image, 0), format=save_format)
  buf.seek(0)
  f = tf.gfile.GFile(output_file, 'w')
  f.write(buf.getvalue())
  f.close()
def save_np_image ( image , output_file , save_format = 'jpeg' ) : image = np . uint8 ( image * 255.0 ) buf = io . BytesIO ( ) skimage . io . imsave ( buf , np . squeeze ( image , 0 ) , format = save_format ) buf . seek ( 0 ) f = tf . gfile . GFile ( output_file , 'w' ) f . write ( buf . getvalue ( ) ) f . close ( )