0
我有一个自定义输入功能,如下所示:为什么tf.train.batch只返回一批功能?
def my_input_fn():
# parse a file and create a dictionary of features
return features
此功能传递给tf.contrib.learn.Estimator.predict
功能input_fn
PARAM。我想以不同批次传递我的数据。搜索后,它似乎是tf.train.batch
的责任。所以,我的编辑功能如下:
def my_input_fn():
# parse a file and create a dictionary of features
return tf.learn.batch(tensors=features, batch_size=100, enqueue_many=True)
问题是呼吁predict(input_fn=my_input_fn)
只适用于一批100例返回估算结果。我如何设计my_input_fn
函数来批量返回所有数据?