-
Notifications
You must be signed in to change notification settings - Fork 26
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 shape unexpected #3
Comments
Looks like a bug. |
Just fixed it try upgrading to new version please! |
"we are aiming to release tomorrow" -Lol aiming |
It worked, but now I'm facing the same issue as #7. Somehow, grad.requires_grad is False when it arrives at the optimizer. Also, I had to comment some lines at init.py, because their files didn't come with the library: |
I've upgraded it, now try upgrading with pip 😊 |
did you solve this question? I also meet this question in megatron... |
`File ~\Python\PyTorch\RL\utils\optim.py:61, in Sophia.hutchinson(self, p, grad)
59 def hutchinson(self, p, grad):
60 u = torch.randn_like(grad)
---> 61 hessian_vector_product = torch.autograd.grad(grad.dot(u), p, retain_graph=True)[0]
62 return u * hessian_vector_product
RuntimeError: 1D tensors expected, but got 4D and 4D tensors`
Does it run on any network architecture?
Upvote & Fund
The text was updated successfully, but these errors were encountered: