There is a tf.TextLineReader and decode_csv in TensorFlow. But there is no CSV_Reader. I just interested to know how can I zip them in order to feed it into tf.contrib.learn.read_batch_features.
1 Answer
how about reading the CSV files with decode_csv and feeding them to tf.train.shuffle_batch_join ?
It's what tf.contrib.learn.read_batch_features does with it's extracted features after all: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/learn/python/learn/learn_io/graph_io.py#L212
read_batch_features is a wrapper over tf.contrib.learn.read_keyed_batch_examples
6 Comments
AmirHJ
Actually, I'm going to modify this source to feed from my csv dataset instead of TFRecord file. So, looking for a minimum modification. Any suggestion?
Jules Gagnon-Marchand
try putting
tf.TextLineReader as the reader argument for read_batch_features, and tf.decode_csv for the parse_fn argumentAmirHJ
'read_batch_features' doesn't accept 'parse_fn', I should call read_batch_example function. Thank you.
EngrStudent
links are broken. Its old version, doesn't apply to tf2.x
Jules Gagnon-Marchand
yeah that's a problem with all of stackoverflow
|