lda2vec icon indicating copy to clipboard operation
lda2vec copied to clipboard

Loss and Prior becomes nan

Open austinlaurice opened this issue 8 years ago • 5 comments

Is this a normal behavior that loss and prior became nan soon after the training process started? I ran the sample code of 20 news group.

screen shot 2017-12-20 at 5 44 43 pm

austinlaurice avatar Dec 20 '17 09:12 austinlaurice

No, I don't think it's working as intended.

bountrisv avatar Jan 23 '18 17:01 bountrisv

Hi, try to reinstall chainer version 1.9 instead of latest one.

aggarwalpiush avatar Jan 28 '18 00:01 aggarwalpiush

changing the code "optimizer.zero_grads()" to "model.cleargrads()",i get a digit.

richzt avatar Jan 29 '18 11:01 richzt

Thank you, aggarwalpiush's answer is correct. I tried chainer version 1.6.0, and I failed to install it. But 1.9.0 succeeded.

But I have no idea how can I use the latest version of chainer in the model. ttjs8423219's solution is disabled in 3.5.0.

MelvinZang avatar Apr 15 '18 05:04 MelvinZang

Hi, I'm also getting nan values in loss and prior same as austinlaurice. I even tried changing the chainer versions with 1.9.0 and latest version 7.1.0. Screenshot from 2020-01-24 10-56-23

Can someone please help me out in resolving the bug.

ee15btech11014 avatar Jan 24 '20 05:01 ee15btech11014