encog-java-core icon indicating copy to clipboard operation
encog-java-core copied to clipboard

Gradient is zero

Open PLEXATIC opened this issue 3 years ago • 0 comments

The function Train.getLastGradient() will return an array containing only zeros, if it is called after Train.iteration(). This is still true even if Train.calculateGradients() is called right before. Also, inside the Function Train.updateWeight(double[] gradients, double[] lastGradients, int index), the lastGradients appear to be only zeros as well. I did a quick check and found that the learn() Function seems to allways reset the gradient values to 0, so this might be the source of the issue. If someone could confirm that this is a bug, I would be happy to attempt to fix it.

PLEXATIC avatar Feb 18 '22 16:02 PLEXATIC