@Test public void when_callingSetPolicy_expect_advantageSetAtCorrectLocation() { INDArray policyArray = Nd4j.zeros(3, 3); sut.setPolicy(policyArray, 1, 2, 123.0); for(int j = 0; j < 3; ++j) { for(int i = 0; i < 3; ++i) { if(j == 1 && i == 2) { assertEquals(123.0, policyArray.getDouble(j, i), 0.00001); } else { assertEquals(0.0, policyArray.getDouble(j, i), 0.00001); } } } }
@Override public void setPolicy(INDArray policy, long idx, int action, double advantage) { policy.putScalar(idx, action, advantage); }
NonRecurrentActorCriticHelper extends ActorCriticHelper { @Override public void setPolicy(INDArray policy, long idx, int action, double advantage) { policy.putScalar(idx, action, advantage); } }
NonRecurrentActorCriticHelper extends ActorCriticHelper { @Override public void setPolicy(INDArray policy, long idx, int action, double advantage) { policy.putScalar(idx, action, advantage); } NonRecurrentActorCriticHelper(int actionSpaceSize); }
NonRecurrentActorCriticHelper extends ActorCriticHelper { @Override public void setPolicy(INDArray policy, long idx, int action, double advantage) { policy.putScalar(idx, action, advantage); } NonRecurrentActorCriticHelper(int actionSpaceSize); @Override INDArray createValueLabels(int trainingBatchSize); @Override INDArray createPolicyLabels(int trainingBatchSize); @Override void setPolicy(INDArray policy, long idx, int action, double advantage); }
NonRecurrentActorCriticHelper extends ActorCriticHelper { @Override public void setPolicy(INDArray policy, long idx, int action, double advantage) { policy.putScalar(idx, action, advantage); } NonRecurrentActorCriticHelper(int actionSpaceSize); @Override INDArray createValueLabels(int trainingBatchSize); @Override INDArray createPolicyLabels(int trainingBatchSize); @Override void setPolicy(INDArray policy, long idx, int action, double advantage);  }