2016-08-29 21 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