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
0a52f120
Commit
0a52f120
authored
Nov 12, 2020
by
Cristina Vasconcelos
Committed by
A. Unique TensorFlower
Nov 12, 2020
Browse files
Internal change
PiperOrigin-RevId: 342136176
parent
31e4a64d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
official/vision/image_classification/preprocessing.py
official/vision/image_classification/preprocessing.py
+2
-2
No files found.
official/vision/image_classification/preprocessing.py
View file @
0a52f120
...
...
@@ -379,12 +379,12 @@ def preprocess_for_train(image_bytes: tf.Tensor,
"""
images
=
decode_crop_and_flip
(
image_bytes
=
image_bytes
)
images
=
resize_image
(
images
,
height
=
image_size
,
width
=
image_size
)
if
augmenter
is
not
None
:
images
=
augmenter
.
distort
(
images
)
if
mean_subtract
:
images
=
mean_image_subtraction
(
image_bytes
=
images
,
means
=
MEAN_RGB
)
if
standardize
:
images
=
standardize_image
(
image_bytes
=
images
,
stddev
=
STDDEV_RGB
)
if
augmenter
is
not
None
:
images
=
augmenter
.
distort
(
images
)
if
dtype
is
not
None
:
images
=
tf
.
image
.
convert_image_dtype
(
images
,
dtype
)
...
...
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