diff options
author | 2017-11-02 01:14:00 -0700 | |
---|---|---|
committer | 2017-11-02 01:17:37 -0700 | |
commit | 0d37bd8fe999b0371cb0b1def6c09920ac97b565 (patch) | |
tree | cdeabd1fb63960542d8e4d0e8558285cbb62483c | |
parent | df397f23b49004fa74934c4b6a28e89d988fb98e (diff) |
Swap resize and normalization order in preprocess image to match the original
FID graph.
PiperOrigin-RevId: 174295997
-rw-r--r-- | tensorflow/contrib/gan/python/eval/python/classifier_metrics_impl.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/gan/python/eval/python/classifier_metrics_impl.py b/tensorflow/contrib/gan/python/eval/python/classifier_metrics_impl.py index ace48ea220..8101e903ab 100644 --- a/tensorflow/contrib/gan/python/eval/python/classifier_metrics_impl.py +++ b/tensorflow/contrib/gan/python/eval/python/classifier_metrics_impl.py @@ -130,10 +130,10 @@ def preprocess_image( with ops.name_scope(scope, 'preprocess', [images, height, width]): if not images.dtype.is_floating: images = math_ops.to_float(images) - images = (images - 128.0) / 128.0 if is_single: images = array_ops.expand_dims(images, axis=0) resized = image_ops.resize_bilinear(images, [height, width]) + resized = (resized - 128.0) / 128.0 if is_single: resized = array_ops.squeeze(resized, axis=0) return resized |