@@ -0,0 +1,1457 @@
+package com.github.klane.wann.learn;%0A%0Aimport com.github.klane.wann.core.Connection;%0Aimport com.github.klane.wann.core.Neuron;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Apublic final class MomentumBackpropagation extends Backpropagation %7B%0A%0A    public static final double DEFAULT_MOMENTUM = 0.2;%0A%0A    private final double momentum;%0A    private final Map%3CConnection, Double%3E previousWeights;%0A%0A    public MomentumBackpropagation(final int numEpochs) %7B%0A        this(numEpochs, DEFAULT_LEARNING_RATE, DEFAULT_MOMENTUM);%0A    %7D%0A%0A    public MomentumBackpropagation(final int numEpochs, final double learningRate) %7B%0A        this(numEpochs, learningRate, DEFAULT_MOMENTUM);%0A    %7D%0A%0A    public MomentumBackpropagation(final int numEpochs, final double learningRate, final double momentum) %7B%0A        super(numEpochs, learningRate);%0A        this.momentum = momentum;%0A        this.previousWeights = new HashMap%3C%3E();%0A    %7D%0A%0A    @Override%0A    protected void beforeTraining() %7B%0A        super.network.forEach(layer -%3E layer.forEach(neuron -%3E neuron.forEach(%0A                connection -%3E this.previousWeights.put(connection, 0.0))));%0A    %7D%0A%0A    @Override%0A    void updateNeuronWeights(final Neuron neuron) %7B%0A        super.updateNeuronWeights(neuron);%0A%0A        neuron.getInputConnections().forEach(c -%3E %7B%0A            c.updateWeight(this.momentum * (c.getWeight() - this.previousWeights.get(c)));%0A            this.previousWeights.put(c, c.getWeight());%0A        %7D);%0A    %7D%0A%7D%0A

Add MomentumBackpropagation.java