Преглед на файлове

Merge pull request #895 from tensorflow/cifar10-inputs

Added shape to cifar10_input.py
Neal Wu преди 8 години
родител
ревизия
dee751fafb
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      tutorials/image/cifar10/cifar10_input.py

+ 4 - 0
tutorials/image/cifar10/cifar10_input.py

@@ -242,6 +242,10 @@ def inputs(eval_data, data_dir, batch_size):
   # Subtract off the mean and divide by the variance of the pixels.
   float_image = tf.image.per_image_standardization(resized_image)
 
+  # Set the shapes of tensors.
+  float_image.set_shape([height, width, 3])
+  read_input.label.set_shape([1])
+
   # Ensure that the random shuffling has good mixing properties.
   min_fraction_of_examples_in_queue = 0.4
   min_queue_examples = int(num_examples_per_epoch *