Skip to content

Instantly share code, notes, and snippets.

net.rnnClearPreviousState();
trainDataIter.reset();
INDArray pred = null;
List<INDArray> predictionsTrain = new ArrayList<>();
while (trainDataIter.hasNext()) {
DataSet t = trainDataIter.next();
INDArray featureMatrix = t.getFeatureMatrix(); // [miniBatchSize,inputSize,inputTimeSeriesLength], 5000x2x20 -> [3,5000,2,20,1,100000,5000,0,-1,99]
INDArray predictionMiniBatch = net.rnnTimeStep(featureMatrix);
normalizer.revertLabels(predictionMiniBatch);