Estimator 以 Coordinator 作为输入函数,用于在 tensorflow 中以分布式方式读取输入数据 [英] Estimator with Coordinator as an input function for reading input data in distributed fashion in tensorflow

查看:27
本文介绍了Estimator 以 Coordinator 作为输入函数,用于在 tensorflow 中以分布式方式读取输入数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CNN cifar10 教程(张量流教程)给出了一个使用低级 API 的示例,用于将读取数据作为独立作业来训练模型(使用多个 GPU).是否可以使用具有低级线程支持和多/单 GPU 训练的高级 API Estimator?

The CNN cifar10 tutorial (tensor flow tutorials) gives an example of low-level API use for reading data as an independent job to train model (with multiple GPU). Is it possible to use high-level API Estimator with low-level threading support and multi/single GPUs training?

我正在寻找一种将两者结合起来的方法:

I am looking for a way to combine both:

input_fn 作为队列,提供与 https://中描述的相同功能www.tensorflow.org/programmers_guide/reading_data Coordinator 类

input_fn as a queue, which gives the same functionality which is described in https://www.tensorflow.org/programmers_guide/reading_data for Coordinator class

coord = tf.train.Coordinator()
threads = tf.train.start_queue_runners(sess=sess, coord=coord)

这对我来说并不简单!

推荐答案

我将代码推送到 此处.
使用 estimator 时支持 input_fn 作为队列.具有低级线程支持和多/单 GPU 训练的高级 API 估算器.并且易于客户编码,满足您的所有需求.

I push a code to here.
It is support input_fn as a queue when using estimator. High-level API Estimator with low-level threading support and multi/single GPUs training. And easy to customer code all of you need.

这篇关于Estimator 以 Coordinator 作为输入函数,用于在 tensorflow 中以分布式方式读取输入数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆