"docs/git@developer.sourcefind.cn:hehl2/torchaudio.git" did not exist on "b3c2cfceb35f8c962bf596f81ea6c5dcc47ed39a"
Unverified Commit 6eeec4e7 authored by Neal Wu's avatar Neal Wu Committed by GitHub
Browse files

Add a note about tf.image.convert_image_dtype

parent 95aec51f
...@@ -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