From e19dec4af91419b929357279a53f48060b155822 Mon Sep 17 00:00:00 2001 From: lluni Date: Wed, 25 May 2022 20:56:55 +0200 Subject: [PATCH] Decreased learningRate for each subsequent epoch to reduce the chance of jumping out of a local minimum --- src/main/java/de/lluni/javann/Network.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/lluni/javann/Network.java b/src/main/java/de/lluni/javann/Network.java index 680cd36..a7c5f40 100644 --- a/src/main/java/de/lluni/javann/Network.java +++ b/src/main/java/de/lluni/javann/Network.java @@ -76,7 +76,7 @@ public class Network { // backward propagation SimpleMatrix error = lossPrime.apply(y_train[j], output); for (int k = layers.size() - 1; k >= 0; k--) { - error = layers.get(k).backwardPropagation(error, learningRate); + error = layers.get(k).backwardPropagation(error, learningRate / (i+1)); } } // calculate average error on all samples