tsne.fit_transform(final_embeddings(...) - ValueError:数组不能包含infs或NaNs

时间:2016-07-13 06:10:11

标签: python python-2.7 tensorflow deep-learning jupyter-notebook

我一直在ipython笔记本上运行此https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/word2vec/word2vec_basic.py,但我收到此错误:

这是完整错误消息的快照: https://postimg.org/image/c3fzj8gif/


我的环境是:

  • numpy'1.11.0'
  • scipy'0.17.0'
  • 在anaconda python 2.7下

有什么想法吗?感谢

1 个答案:

答案 0 :(得分:0)

您的程序是否成功下载数据?在错误消息之前,你有没有看到这个输出?

Found and verified text8.zip
Data size 17005207
Most common words (+UNK) [['UNK', 418391], ('the', 1061396), ('of', 593677), ('and', 416629), ('one', 411764)]
Sample data [5241, 3083, 12, 6, 195, 2, 3136, 46, 59, 156] ['anarchism', 'originated', 'as', 'a', 'term', 'of', 'abuse', 'first', 'used', 'against']