lukecq1231 / nli

Enhanced LTSM for natural language inference
Apache License 2.0
265 stars 70 forks source link

NaN detected #2

Open dirkweissenborn opened 7 years ago

dirkweissenborn commented 7 years ago

Hi, I am getting a NaN detected error. Just running your scripts with minor adaptations, i.e.:

Training runs fine until Epoch 5 Update 91000 ...

lukecq1231 commented 7 years ago

I don't know why this happens. I suspect that it's because there're 0 in denominators. Maybe you can try add a smooth item (i.e. 1E-8) in denominator at line 462, 463 in ESIM/main.py.