neural-style-audio-torch icon indicating copy to clipboard operation
neural-style-audio-torch copied to clipboard

Porting to PyTorch

Open nithya4 opened this issue 7 years ago • 1 comments

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?

nithya4 avatar Dec 11 '17 18:12 nithya4

Hi @nithya4 ! Were you able to resolve this issue? Thanks! :)

sidak avatar May 11 '18 12:05 sidak