Map<NeuralNetwork, OneStepTrainer<?>> map = new HashMap<>();
map.put(dbn.getFirstNeuralNetwork(), firstTrainer);
map.put(dbn.getLastNeuralNetwork(), lastTrainer);
// deep trainer
DBNTrainer deepTrainer = TrainerFactory.dbnTrainer(dbn, map, trainInputProvider, null, null);
Environment.getInstance().setExecutionMode(EXECUTION_MODE.SEQ);
// layer pre-training
deepTrainer.train();
// fine tuning backpropagation
BackPropagationTrainer<?> bpt = TrainerFactory.backPropagation(dbn, trainInputProvider, testInputProvider, new MultipleNeuronsOutputError(), new NNRandomInitializer(new MersenneTwisterRandomInitializer(-0.01f, 0.01f)), 0.01f, 0.5f, 0f, 0f, 0f, 150, 150, 1000);
// log data