2016-08-29 6 views

Antwort

1

Wie wäre es mit dem Lesen der CSV-Dateien mit decode_csv und füttern sie tf.train.shuffle_batch_join?

Es ist, was tf.contrib.learn.read_batch_features tut damit Funktionen schließlich extrahiert ist: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/learn/python/learn/learn_io/graph_io.py#L212

read_batch_features ist ein Wrapper über tf.contrib.learn.read_keyed_batch_examples

+0

Eigentlich werde ich ändern [diese Quelle] (https://github.com/ dennybritz/chatbot-retrieval/blob/master/udc_inputs.py # L38-L46), um von meinem csv-Dataset anstelle von TFRecord-Datei zu füttern. Also, auf der Suche nach einer minimalen Modifikation. Irgendein Vorschlag? – AmirHJ

+0

versuchen Sie, 'tf.TextLineReader' als das' reader' Argument für 'read_batch_features' und' tf.decode_csv' für das 'parse_fn' Argument zu setzen – Julius

+1

'read_batch_features' akzeptiert 'parse_fn' nicht, ich sollte [read_batch_example] (https://www.tensorflow.org/versions/r0.10/api_docs/python/contrib.learn.html#read_batch_examples) Funktion. Vielen Dank. – AmirHJ