I am trying to learn tenforflow following the Convolutional Neural Networks tutorial, but when I tried to figure out how cifar10_input.py loads data from cifar-10-batches-bin , I ran into the problem that Tensor.eval() executing for a very long time or works forever without result. The code looks like this:
import tensorflow as tf from tensorflow.models.image.cifar10 import cifar10_input filenames = ['/Users/me/Downloads/cifar-10-batches-bin/data_batch_1.bin'] filename_queue = tf.train.string_input_producer(filenames) read_input = cifar10_input.read_cifar10(filename_queue) reshaped_image = tf.cast(read_input.uint8image, tf.float32) with tf.Session() as sess: print reshaped_image.eval()
The code is mainly from cifar10_input.py , and the data_batch_1.bin file is extracted from cifar-10-binary.tar.gz .
Usually I can observe the tensor using its eval() method. But in this case, it works continuously for a longer time than ever (I waited almost an hour, and it still worked). Is there something wrong in my code?
source share