@Test public void when_callingSetLabels_expect_INDArrayWithCorrectShape() { INDArray labels = Nd4j.zeros(2, 2); INDArray data = Nd4j.create(new double[] { 1.1, 1.2 }); sut.setLabels(labels, 1, data); assertEquals(0.0, labels.getDouble(0, 0), 0.00001); assertEquals(0.0, labels.getDouble(0, 1), 0.00001); assertEquals(1.1, labels.getDouble(1, 0), 0.00001); assertEquals(1.2, labels.getDouble(1, 1), 0.00001); }
@Override public void setLabels(INDArray labels, long idx, INDArray data) { labels.putRow(idx, data); }
NonRecurrentNStepQLearningHelper extends NStepQLearningHelper { @Override public void setLabels(INDArray labels, long idx, INDArray data) { labels.putRow(idx, data); } }
NonRecurrentNStepQLearningHelper extends NStepQLearningHelper { @Override public void setLabels(INDArray labels, long idx, INDArray data) { labels.putRow(idx, data); } NonRecurrentNStepQLearningHelper(int actionSpaceSize); }
NonRecurrentNStepQLearningHelper extends NStepQLearningHelper { @Override public void setLabels(INDArray labels, long idx, INDArray data) { labels.putRow(idx, data); } NonRecurrentNStepQLearningHelper(int actionSpaceSize); @Override INDArray createLabels(int trainingBatchSize); @Override INDArray getExpectedQValues(INDArray allExpectedQValues, int idx); @Override void setLabels(INDArray labels, long idx, INDArray data); @Override INDArray getTargetExpectedQValuesOfLast(IOutputNeuralNet target, List<StateActionPair<Integer>> trainingBatch, INDArray features); }
NonRecurrentNStepQLearningHelper extends NStepQLearningHelper { @Override public void setLabels(INDArray labels, long idx, INDArray data) { labels.putRow(idx, data); } NonRecurrentNStepQLearningHelper(int actionSpaceSize); @Override INDArray createLabels(int trainingBatchSize); @Override INDArray getExpectedQValues(INDArray allExpectedQValues, int idx); @Override void setLabels(INDArray labels, long idx, INDArray data); @Override INDArray getTargetExpectedQValuesOfLast(IOutputNeuralNet target, List<StateActionPair<Integer>> trainingBatch, INDArray features);  }