2016-08-29 22 views

回答

1

如何使用decode_csv读取CSV文件并将它们送入tf.train.shuffle_batch_join

tf.contrib.learn.read_batch_features做什么用它提取的特征毕竟:https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/learn/python/learn/learn_io/graph_io.py#L212

read_batch_features超过tf.contrib.learn.read_keyed_batch_examples

+0

其实,我要去修改[此来源]的包装(https://github.com/ dennybritz/chatbot-retrieval/blob/master/udc_inputs.py#L38-L46)从我的csv数据集而不是TFRecord文件提供。所以,寻找一个最小的修改。任何建议? – AmirHJ

+0

尝试将'tf.TextLineReader'作为read_batch_features的'reader'参数,'parse_fn'参数的'tf.decode_csv' – Julius

+1

'read_batch_features'不接受'parse_fn',我应该调用[read_batch_example]( https://www.tensorflow.org/versions/r0.10/api_docs/python/contrib.learn.html#read_batch_examples)函数。谢谢。 – AmirHJ