tf.contrib.gan.eval.classifier_metrics.preprocess_imagetf.contrib.gan.eval.preprocess_imagetf.contrib.gan.eval.preprocess_image(
images,
height=INCEPTION_DEFAULT_IMAGE_SIZE,
width=INCEPTION_DEFAULT_IMAGE_SIZE,
scope=None
)
Defined in tensorflow/contrib/gan/python/eval/python/classifier_metrics_impl.py.
Prepare a batch of images for evaluation.
This is the preprocessing portion of the graph from http://download.tensorflow.org/models/image/imagenet/inception-2015-12-05.tgz.
Note that it expects Tensors in [0, 255]. This function maps pixel values to [-1, 1] and resizes to match the InceptionV1 network.
images: 3-D or 4-D Tensor of images. Values are in [0, 255].height: Integer. Height of resized output image.width: Integer. Width of resized output image.scope: Optional scope for name_scope.3-D or 4-D float Tensor of prepared image(s). Values are in [-1, 1].
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/gan/eval/preprocess_image