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
7772cb1d
Unverified
Commit
7772cb1d
authored
Apr 22, 2019
by
Toby Boyd
Committed by
GitHub
Apr 22, 2019
Browse files
Use tf.image.resize_with_crop_or_pad (#6632)
parent
56b5d037
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
official/resnet/cifar10_main.py
official/resnet/cifar10_main.py
+1
-1
No files found.
official/resnet/cifar10_main.py
View file @
7772cb1d
...
@@ -93,7 +93,7 @@ def preprocess_image(image, is_training):
...
@@ -93,7 +93,7 @@ def preprocess_image(image, is_training):
"""Preprocess a single image of layout [height, width, depth]."""
"""Preprocess a single image of layout [height, width, depth]."""
if
is_training
:
if
is_training
:
# Resize the image to add four extra pixels on each side.
# Resize the image to add four extra pixels on each side.
image
=
tf
.
image
.
resize_
image_
with_crop_or_pad
(
image
=
tf
.
image
.
resize_with_crop_or_pad
(
image
,
HEIGHT
+
8
,
WIDTH
+
8
)
image
,
HEIGHT
+
8
,
WIDTH
+
8
)
# Randomly crop a [HEIGHT, WIDTH] section of the image.
# Randomly crop a [HEIGHT, WIDTH] section of the 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