My problem is “fitting a 1D signal”. the signals are stored in a CSV file with the size of 1000 * 2069 (1:2048 -> features, 2049:2069 -> targets/labels).
I loaded a CSV file using this piece of code:
RecordReader recordReader = new CSVRecordReader(0,','); recordReader.initialize(new FileSplit(new File("D:\\deep fitting\\Labels.csv"))); DataSetIterator iterator = new RecordReaderDataSetIterator.Builder(recordReader,1000) .regression(2048, 2068) .build(); DataSet allData = iterator.next();
However, the input of my network is 1D Conv layer:
.layer(new Convolution1DLayer.Builder().kernelSize(5).convolutionMode(ConvolutionMode.Same) .nIn(1).nOut(16).build())
when i run my code, i encountered this Error:
Invalid input: expect CNN activations with rank 4 (received input with shape [800, 2048])
which is logical, so I convert the shape of features matrix.
(I do not know it is okay or not) however this time i got this error:
Exception in thread "main" java.lang.IllegalStateException: Invalid input, does not match configuration: expected [minibatch, numChannels=1, inputHeight=1, inputWidth=2048] but got input array ofshape [800, 2048, 1, 1]