ryankiros / skip-thoughts

Sent2Vec encoder and training code from the paper "Skip-Thought Vectors"
2.05k stars 544 forks source link

There is a nan when calculate uff[j]. #35

Open AlvinYuXT opened 7 years ago

AlvinYuXT commented 7 years ago

i'm using this code to calculate the Semantic-Relatedness. When i run this code import eval_sick eval_sick.evaluate(model, evaltest=True) I got an error as follow:

File "/home/weixinru/skip-thoughts-master/skipthoughts.py", line 145, in encode bff[j] /= norm(bff[j]) File "/usr/lib64/python2.7/site-packages/scipy/linalg/misc.py", line 129, in norm a = np.asarray_chkfinite(a) File "/usr/lib/python2.7/site-packages/numpy/lib/function_base.py", line 1033, in asarray_chkfinite "array must not contain infs or NaNs") ValueError: array must not contain infs or NaNs

I also found that this code run well when the input file is small. And if the file has more than about 200 rows the error will happen

AlvinYuXT commented 7 years ago

I fixed this bug after updating theano, bu another bug appears. The error is that: wechatimg61