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

Porting to PyTorch #3

Open
nithya4 opened this issue Dec 11, 2017 · 1 comment
Open

Porting to PyTorch #3

nithya4 opened this issue Dec 11, 2017 · 1 comment

Comments

@nithya4
Copy link

nithya4 commented Dec 11, 2017

I tried porting the code to PyTorch, specifically the Tensorflow version. The latter works perfectly.
But with PyTorch when I use optim.LBFGS, I run into exploding gradients/no updates on the target.
The error is in the update:
151
152 #update scale of initial Hessian approximation
--> 153 H_diag = ys / y.dot(y) # (y*y)
154
155 # compute the approximate (L-BFGS) inverse Hessian

ZeroDivisionError: float division by zero

I am running this on CPU only for the time being - macOS 10.13.1 64 bit.
Any insights on why this may be happening?

@sidak
Copy link

sidak commented May 11, 2018

Hi @nithya4 ! Were you able to resolve this issue? 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

2 participants