FullyConnected fc3 = cf.fullyConnected(leaf1, output, 3, 1);
fc3.getWeights().forEach(i -> fc3.getWeights().getElements()[i] = 0.3f);
mlp.addConnections(fc3);
FullyConnected fc4 = cf.fullyConnected(leaf2, output, 3, 1);
fc4.getWeights().forEach(i -> fc4.getWeights().getElements()[i] = 0.4f);
mlp.addConnections(fc4);
mlp.setLayerCalculator(NNFactory.lcWeightedSum(mlp, null));
Set<Layer> calculated = new HashSet<>();
calculated.add(mlp.getInputLayer());