Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Multithreading Tensorflow tf.估计量.带QueueRunner的估计量_Multithreading_Tensorflow_Tensorflow Estimator - Fatal编程技术网

Multithreading Tensorflow tf.估计量.带QueueRunner的估计量

Multithreading Tensorflow tf.估计量.带QueueRunner的估计量,multithreading,tensorflow,tensorflow-estimator,Multithreading,Tensorflow,Tensorflow Estimator,我正在重写我的to代码,以使用tf.estimator.estimator作为模型的封装对象。 问题是: 我看不出典型的输入管道有多适合这幅图 我的输入管道使用由tf.train.Coordinator协调的队列 为了满足tf.estimator.estimator的要求,我在init_fn函数中创建了所有输入图,调用时传递给estimator: Estimator.train(...) 看起来像这样 输入fnf: 问题是:在这种情况下,我如何分别在估计器的开始和开始处启动和停止队列运行程序

我正在重写我的to代码,以使用tf.estimator.estimator作为模型的封装对象。 问题是: 我看不出典型的输入管道有多适合这幅图

我的输入管道使用由tf.train.Coordinator协调的队列

为了满足tf.estimator.estimator的要求,我在init_fn函数中创建了所有输入图,调用时传递给estimator:

Estimator.train(...) 
看起来像这样 输入fnf:

问题是:在这种情况下,我如何分别在估计器的开始和开始处启动和停止队列运行程序。训练

开始

我找到了启动我可以传递的队列的方法,并使用init_fn对传递给估计器的scaffold对象执行此操作

然而,如何连接线程并优雅地关闭它们-这我不知道

使用tf.estimator时,是否有合适的线程输入管道的参考体系结构

Estimator类准备好处理队列了吗?

Estimator使用tf.train.MonitoredTrainingSession处理启动和加入线程。您可以检查几个示例输入FN,例如 tf.estimator.input.*,tf.contrib.learn.io.read*

...create input graph...
qr = tf.train.QueueRunner(queue, [operations...])
tf.train.add_queue_runner(qr)