"examples/vscode:/vscode.git/clone" did not exist on "9aa6fcab60962398650d6b09cc48b140665b3364"
Commit f98c5ded authored by Lukasz Kaiser's avatar Lukasz Kaiser Committed by GitHub
Browse files

Merge pull request #449 from chenliu0831/master

Fix signature change of resize_images()
parents c5bb0543 253ca4ab
...@@ -253,8 +253,8 @@ def distort_image(image, height, width, bbox, thread_id=0, scope=None): ...@@ -253,8 +253,8 @@ def distort_image(image, height, width, bbox, thread_id=0, scope=None):
# fashion based on the thread number. # fashion based on the thread number.
# Note that ResizeMethod contains 4 enumerated resizing methods. # Note that ResizeMethod contains 4 enumerated resizing methods.
resize_method = thread_id % 4 resize_method = thread_id % 4
distorted_image = tf.image.resize_images(distorted_image, height, width, distorted_image = tf.image.resize_images(distorted_image, [height, width],
resize_method) method=resize_method)
# Restore the shape since the dynamic slice based upon the bbox_size loses # Restore the shape since the dynamic slice based upon the bbox_size loses
# the third dimension. # the third dimension.
distorted_image.set_shape([height, width, 3]) distorted_image.set_shape([height, width, 3])
......
...@@ -212,7 +212,7 @@ def preprocess_for_train(image, height, width, bbox, ...@@ -212,7 +212,7 @@ def preprocess_for_train(image, height, width, bbox,
num_resize_cases = 1 if fast_mode else 4 num_resize_cases = 1 if fast_mode else 4
distorted_image = apply_with_random_selector( distorted_image = apply_with_random_selector(
distorted_image, distorted_image,
lambda x, method: tf.image.resize_images(x, height, width, method), lambda x, method: tf.image.resize_images(x, [height, width], method=method),
num_cases=num_resize_cases) num_cases=num_resize_cases)
tf.image_summary('cropped_resized_image', tf.image_summary('cropped_resized_image',
......
...@@ -634,7 +634,7 @@ ...@@ -634,7 +634,7 @@
" \n", " \n",
" # Preprocess the image for display purposes.\n", " # Preprocess the image for display purposes.\n",
" image_raw = tf.expand_dims(image_raw, 0)\n", " image_raw = tf.expand_dims(image_raw, 0)\n",
" image_raw = tf.image.resize_images(image_raw, height, width)\n", " image_raw = tf.image.resize_images(image_raw, [height, width])\n",
" image_raw = tf.squeeze(image_raw)\n", " image_raw = tf.squeeze(image_raw)\n",
"\n", "\n",
" # Batch it up.\n", " # Batch it up.\n",
......
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