Unverified Commit 7772cb1d authored by Toby Boyd's avatar Toby Boyd Committed by GitHub
Browse files

Use tf.image.resize_with_crop_or_pad (#6632)

parent 56b5d037
...@@ -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.
......
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