In "backPropagation.cpp" the gradients are input to a new Matrix (Line 85). Then deleted and after that recreated in line 90. After that deleted again in line 142.
If we only have one loop then it's fine, but if we have more loops (e.g. if we have more hidden layers) then the loop is entered again with the deleted gradients. Which is wrong.
I propose to shift line 142 to line 150 (after the loop).
In "backPropagation.cpp" the gradients are input to a new Matrix (Line 85). Then deleted and after that recreated in line 90. After that deleted again in line 142.
If we only have one loop then it's fine, but if we have more loops (e.g. if we have more hidden layers) then the loop is entered again with the deleted gradients. Which is wrong.
I propose to shift line 142 to line 150 (after the loop).