"torchvision/csrc/vscode:/vscode.git/clone" did not exist on "668348ed6456d027b915b4a7b463aa5c7c896f09"
Unverified Commit f568ca59 authored by Neal Wu's avatar Neal Wu Committed by GitHub
Browse files

Merge pull request #3340 from tensorflow/convert_image_dtype-explanation

Add a note about tf.image.convert_image_dtype
parents 40d29d42 6eeec4e7
...@@ -82,6 +82,8 @@ def parse_record(raw_record, is_training): ...@@ -82,6 +82,8 @@ def parse_record(raw_record, is_training):
image = tf.image.decode_image( image = tf.image.decode_image(
tf.reshape(parsed['image/encoded'], shape=[]), tf.reshape(parsed['image/encoded'], shape=[]),
_NUM_CHANNELS) _NUM_CHANNELS)
# Note that tf.image.convert_image_dtype scales the image data to [0, 1).
image = tf.image.convert_image_dtype(image, dtype=tf.float32) image = tf.image.convert_image_dtype(image, dtype=tf.float32)
image = vgg_preprocessing.preprocess_image( image = vgg_preprocessing.preprocess_image(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment