【发布时间】:2017-07-10 03:44:42
【问题描述】:
您能否提供一个使用高级 API 估算器与占位符和喂料批次的示例,例如用于基本用途:
for step in xrange(max_steps):
batch_of_inputs,batch_of_targets= get_batch_from_disk(step)# e.g.batches are stored as list where step is and index of the list
feed_dict = {x:batch_of_inputs,y:batch_of_targets}
_, loss_value = sess.run([train_op, loss],
feed_dict=feed_dict)
如何使用 Estimator API 做同样的事情? Estimator 将 batch_size、steps、input_fuc 或 feed_fun 作为 fit 函数的参数(参见 doc https://www.tensorflow.org/versions/master/api_docs/python/contrib.learn/estimators),但我不清楚如何实现一个函数,该函数将从例如批量加载数据磁盘?
【问题讨论】:
标签: python tensorflow neural-network