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)如果您发布更多代码,也许我可以更深入地研究它.与此同时,HTH.If you post some more code, maybe I could take a deeper look into it. In the meantime, HTH. 这篇关于TensorFlow random_shuffle_queue 关闭且元素不足的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-24 19:36