TensorFlow random_shuffle_queue is closed and has insufficient elements

后端 未结 6 1296
借酒劲吻你
借酒劲吻你 2020-12-15 05:00

I\'m reading batch of images by getting idea here from tfrecords(converted by this)

My images are cifar images, [32, 32, 3] and as you can see while reading and pas

6条回答
  •  别那么骄傲
    2020-12-15 05:44

    I had a similar problem. Digging around the web, it turned out that if you use some num_epochs argument, you have to initialize all the local variables, so your code should end up looking like:

    with tf.Session() as sess:
        sess.run(tf.local_variables_initializer())
        sess.run(tf.global_variables_initializer())
        coord = tf.train.Coordinator()
        threads = tf.train.start_queue_runners(coord=coord)
    
        # do your stuff here
    
        coord.request_stop()
        coord.join(threads)
    

    If you post some more code, maybe I could take a deeper look into it. In the meantime, HTH.

提交回复
热议问题