(image, output_height, output_width)
return tf.image.per_image_standardization(resized_image)
Preprocesses the given image for evaluation.

  Args:
    image: A `Tensor` representing an image of arbitrary size.
    output_height: The height of the image after preprocessing.
    output_width: The width of the image after preprocessing.

  Returns:
    A preprocessed image.
Preprocesses the given image for evaluation.
Preprocesses the given image for evaluation .
def preprocess_for_eval(image, output_height, output_width):
  """Preprocesses the given image for evaluation.

  Args:
    image: A `Tensor` representing an image of arbitrary size.
    output_height: The height of the image after preprocessing.
    output_width: The width of the image after preprocessing.

  Returns:
    A preprocessed image.
  """
  tf.summary.image('image', tf.expand_dims(image, 0))
  # Transform the image to floats.
  image = tf.to_float(image)

  # Resize and crop if needed.
  resized_image = tf.image.resize_image_with_crop_or_pad(image,
                                                         output_width,
                                                         output_height)
  tf.summary.image('resized_image', tf.expand_dims(resized_image, 0))

  # Subtract off the mean and divide by the variance of the pixels.
  return tf.image.per_image_standardization(resized_image)
def preprocess_for_eval ( image , output_height , output_width ) : tf . summary . image ( 'image' , tf . expand_dims ( image , 0 ) ) # Transform the image to floats. image = tf . to_float ( image ) # Resize and crop if needed. resized_image = tf . image . resize_image_with_crop_or_pad ( image , output_width , output_height ) tf . summary . image ( 'resized_image' , tf . expand_dims ( resized_image , 0 ) ) # Subtract off the mean and divide by the variance of the pixels. return tf . image . per_image_standardization ( resized_image )