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

why NetC.zero_grad()? #15

Open
NdaAzr opened this issue Apr 10, 2020 · 0 comments
Open

why NetC.zero_grad()? #15

NdaAzr opened this issue Apr 10, 2020 · 0 comments

Comments

@NdaAzr
Copy link

NdaAzr commented Apr 10, 2020

I am wondering why you used NetC.zero_grad() in train.py, however usually zero_grad() function should set on the optimizer? Could you please explain this. It would be great if there were some more comments in the code.
Thank you

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