标签:fifo src read runners queue 图片 队列 image star
import tensorflow as tf queue = tf.FIFOQueue(100,"float") enqueue_op = queue.enqueue([tf.random_normal([1])]) qr = tf.train.QueueRunner(queue, [enqueue_op] * 5) tf.train.add_queue_runner(qr) out_tensor = queue.dequeue() with tf.Session() as sess: coord = tf.train.Coordinator() threads = tf.train.start_queue_runners(sess=sess, coord=coord) for _ in range(3): print(sess.run(out_tensor)[0]) coord.request_stop() coord.join(threads)
吴裕雄 python 神经网络——TensorFlow 多线程队列操作
标签:fifo src read runners queue 图片 队列 image star
原文地址:https://www.cnblogs.com/tszr/p/10885376.html