Skip to content

Commit 19c23e7

Browse files
committed
Added shape to cifar10_input.py
Fixes #893
1 parent 2cd62f6 commit 19c23e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tutorials/image/cifar10/cifar10_input.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ def inputs(eval_data, data_dir, batch_size):
242242
# Subtract off the mean and divide by the variance of the pixels.
243243
float_image = tf.image.per_image_standardization(resized_image)
244244

245+
# Set the shapes of tensors.
246+
float_image.set_shape([height, width, 3])
247+
read_input.label.set_shape([1])
248+
245249
# Ensure that the random shuffling has good mixing properties.
246250
min_fraction_of_examples_in_queue = 0.4
247251
min_queue_examples = int(num_examples_per_epoch *

0 commit comments

Comments
 (0)