undreamt icon indicating copy to clipboard operation
undreamt copied to clipboard

"nan" error occurs for the valuable "logprobs" in L87 of translator.py

Open JunjieHu opened this issue 6 years ago • 5 comments

Hi, I am running an experiment for unsupervised Slovak-English translation. I get the "nan" error during beam search decoding. That is, the valuable "logprobs" in L87 of translator.py contains all "nan". https://github.com/artetxem/undreamt/blob/master/undreamt/ translator.py#L87

I follow the same setting in your paper (train bilingual wordings by vecmap and run for 300k iterations). Does anyone know how to fix it? Thanks!

JunjieHu avatar May 17 '18 17:05 JunjieHu

It looks like the error is on greedy decoding, not beam search. Does this happen at training or test time?

artetxem avatar May 17 '18 20:05 artetxem

Hi sorry for the late response. I know the error happens during the test time. But I didn't print out the logprobs during the training, I am not sure whether this value becomes "nan" or not during training time (but I guess it happens).

JunjieHu avatar Jul 31 '18 20:07 JunjieHu

Hello @JunjieHu, did you solve the NAN problem?

masonreznov avatar May 05 '20 02:05 masonreznov

Hi @masonreznov unfortunately I didn't solve the NAN problem. Maybe @artetxem could suggest a fix to this.

JunjieHu avatar May 06 '20 21:05 JunjieHu

I have the same issue, this happens during training as well for me

mlschomaker avatar Jan 20 '21 21:01 mlschomaker