Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
6eeec4e7
Unverified
Commit
6eeec4e7
authored
Feb 07, 2018
by
Neal Wu
Committed by
GitHub
Feb 07, 2018
Browse files
Add a note about tf.image.convert_image_dtype
parent
95aec51f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
official/resnet/imagenet_main.py
official/resnet/imagenet_main.py
+2
-0
No files found.
official/resnet/imagenet_main.py
View file @
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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment