Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about the code update weight in the function updateWeights. #179

Open
lbgitjp opened this issue Sep 27, 2022 · 0 comments
Open

about the code update weight in the function updateWeights. #179

lbgitjp opened this issue Sep 27, 2022 · 0 comments

Comments

@lbgitjp
Copy link

lbgitjp commented Sep 27, 2022

the weight update code as below:

playground/src/nn.ts

Lines 357 to 358 in 02469bd

link.weight = link.weight -
(learningRate / link.numAccumulatedDers) * link.accErrorDer;

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant