playground icon indicating copy to clipboard operation
playground copied to clipboard

about the code update weight in the function updateWeights.

Open lbgitjp opened this issue 3 years ago • 0 comments

the weight update code as below: https://github.com/tensorflow/playground/blob/02469bd3751764b20486015d4202b792af5362a6/src/nn.ts#L357-L358

To better understand for beginners, the weight update code is better modified to: link.weight = link.weight - learningRate * (link.accErrorDer / link.numAccumulatedDers) ;

I know the result is the same, but (link.accErrorDer / link.numAccumulatedDers) is easier to understand than (learningRate / link.numAccumulatedDers).

thanks.

lbgitjp avatar Sep 27 '22 03:09 lbgitjp