I want to read a simple CSV file with just a list of numbers using Datavec, for use within Deeplearning4j. I've tried numerous examples but keep getting errors. e.g. when I execute this:
RecordReader rrTest = new CSVRecordReader();
rrTest.initialize(new FileSplit(new File(INPUT_FILE)));
DataSetIterator testIter = new RecordReaderDataSetIterator(rrTest, 150, 0, 1);
I get this error:
Exception in thread "main" org.nd4j.linalg.exception.ND4JIllegalStateException: Invalid shape: Requested INDArray shape [144, 0] contains dimension size values < 1 (all dimensions must be 1 or more).
Changing the 'labelIndex' from 0 to 1 gives the same error.
The data in the file looks like this:
112
118
132
129
121
135
148
148
136
119
104
118
115
How do I read this file? I guess the result should be a DataSet, as input for a dl4j.