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

gradient scaling in fp16 training #44

Closed
luguansong opened this issue Jun 28, 2022 · 1 comment · Fixed by #52
Closed

gradient scaling in fp16 training #44

luguansong opened this issue Jun 28, 2022 · 1 comment · Fixed by #52

Comments

@luguansong
Copy link

Hi,

I would like to first thank you for open-sourcing your code for the community.

During using the code for fp16 (or amp) training, I found something confusing at https://github.com/openai/guided-diffusion/blob/main/guided_diffusion/fp16_util.py#L202 . Why do you only scale the gradient for scalar parameters? what about the gradient of matrix parameters?

Sincerely looking forward to your reply.

@unixpickle
Copy link
Collaborator

This actually does look like a bug. I don't know if this was a bug introduced when porting our code over to this public repo, or if it was a bug that impacted our own experiments. Will have to look into it.

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

Successfully merging a pull request may close this issue.

2 participants