I downloaded the CIFAR10 code from the link in the tutorial here , and I'm trying to run the tutorial. I run it with the command
python cifar10_train.py
It starts fine and loads the data file as expected. When it tries to open the input file, it fails with the following trace:
Traceback (most recent call last):
File "cifar10_train.py", line 120, in <module>
tf.app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "cifar10_train.py", line 116, in main
train()
File "cifar10_train.py", line 63, in train
images, labels = cifar10.distorted_inputs()
File "/notebooks/Python Scripts/tensorflowModels/tutorials/image/cifar10/cifar10.py", line 157, in distorted_inputs
batch_size=FLAGS.batch_size)
File "/notebooks/Python Scripts/tensorflowModels/tutorials/image/cifar10/cifar10_input.py", line 161, in distorted_inputs
read_input = read_cifar10(filename_queue)
File "/notebooks/Python Scripts/tensorflowModels/tutorials/image/cifar10/cifar10_input.py", line 87, in read_cifar10
tf.strided_slice(record_bytes, [0], [label_bytes]), tf.int32)
TypeError: strided_slice() takes at least 4 arguments (3 given)
Of course, when I examine the code, there is a call in cifar10_input.py for strided_slice () with only three arguments:
tf.strided_slice(record_bytes, [0], [label_bytes])
While the tensorflow documentation does indicate that there must be at least 4 arguments.
What is going wrong? I downloaded the last tensorflow (0.12) and I am running the main branch of cifar code.
source
share