DBN dbn = NNFactory.dbn(new int[] {4, 4, 3}, true);
assertEquals(2, dbn.getNeuralNetworks().size(), 0);
dbn.setLayerCalculator(NNFactory.lcSigmoid(dbn, null));
IrisInputProvider trainInputProvider = new IrisInputProvider(new IrisTargetMultiNeuronOutputConverter(), false);
trainInputProvider.addInputModifier(new ScalingInputFunction(trainInputProvider));
IrisInputProvider testInputProvider = new IrisInputProvider(new IrisTargetMultiNeuronOutputConverter(), false);
testInputProvider.addInputModifier(new ScalingInputFunction(testInputProvider));
// rbm trainers for each layer
AparapiCDTrainer firstTrainer = TrainerFactory.cdSigmoidBinaryTrainer(dbn.getFirstNeuralNetwork(), null, null, null, new NNRandomInitializer(new MersenneTwisterRandomInitializer(-0.01f, 0.01f)), 0.01f, 0.5f, 0f, 0f, 1, 150, 1000, true);
AparapiCDTrainer lastTrainer = TrainerFactory.cdSigmoidBinaryTrainer(dbn.getLastNeuralNetwork(), null, null, null, new NNRandomInitializer(new MersenneTwisterRandomInitializer(-0.01f, 0.01f)), 0.01f, 0.5f, 0f, 0f, 1, 150, 1000, true);