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 gradient accumulation in your douban_final.py #2

Open
Xie-Minghui opened this issue Aug 11, 2021 · 1 comment
Open

About gradient accumulation in your douban_final.py #2

Xie-Minghui opened this issue Aug 11, 2021 · 1 comment

Comments

@Xie-Minghui
Copy link

image
in your code, if args.gradient_accumulation_steps > 1, loss.backward() will not be excuted. But in every step, loss.backward() should be excuted.
The normal gradient accumulation process is as follows:
image

I don't know if I was wrong.

@hanjanghoon
Copy link
Owner

Sorry for the late reply.
As you said, the gradient accumulation code is not implemented properly.
At first I tried to use it, but I got a new gpu card, so I didn't implement it.

thank you for your opinion. i will modify code soon.

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

2 participants