"examples/pytorch/vscode:/vscode.git/clone" did not exist on "6a1f94d362d9eab8f49fb109d7b4188d1830b3e8"
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):
image = tf.image.decode_image(
tf.reshape(parsed['image/encoded'], shape=[]),
_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 = 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