return new AparapiCDTrainer(rbmProperties(rbm, lc, trainingSet, testingSet, error, rand, learningRate, momentum, l1weightDecay, l2weightDecay, gibbsSampling, isPersistentCD));
}
protected static Properties rbmProperties(RBM rbm, RBMLayerCalculator lc, TrainingInputProvider trainingSet, TrainingInputProvider testingSet, OutputError error, NNRandomInitializer rand, float learningRate, float momentum, float l1weightDecay, float l2weightDecay, int gibbsSampling, boolean resetRBM) {
Properties p = new Properties();
p.setParameter(Constants.NEURAL_NETWORK, rbm);
p.setParameter(Constants.TRAINING_INPUT_PROVIDER, trainingSet);
p.setParameter(Constants.TESTING_INPUT_PROVIDER, testingSet);
p.setParameter(Constants.LEARNING_RATE, learningRate);
p.setParameter(Constants.MOMENTUM, momentum);
p.setParameter(Constants.L1_WEIGHT_DECAY, l1weightDecay);
p.setParameter(Constants.L2_WEIGHT_DECAY, l2weightDecay);
p.setParameter(Constants.GIBBS_SAMPLING_COUNT, gibbsSampling);
p.setParameter(Constants.OUTPUT_ERROR, error);
p.setParameter(Constants.RANDOM_INITIALIZER, rand);
p.setParameter(Constants.RESET_RBM, resetRBM);
p.setParameter(Constants.LAYER_CALCULATOR, lc);
return p;
}