I am attempting to read a large number of strings of text from a CSV file. Each string is separated via a line break, and none are the same length. The documentation on the Tensorflow website provides instruction on how to input csv data, but it is unclear and is also not applicable to my problem. So my question is, what is the best way to go about taking large amounts of short (<140 character) strings from a CSV file, and inputting them into a RNN or LSTM using the tensorflow data pipeline?
Asked
Active
Viewed 1,034 times
1 Answers
0
We discussed how to read from the CSV file and to form batches here: [Converting TensorFlow tutorial to work with my own data There is detailed code there that works (not for RNN, but you can adapt it). I'd imagine you might have an issue with having strings of varying length, because TF expects you to pre-fill the variable that will hold the the data from each line of the CSV with a pre-determined list of default values. Not sure how easy it would be to get around that, but your life would be much easier if you had each line of the CSV with fixed length and then work from there inside TF.