【问题标题】:tsne.fit_transform(final_embeddings(...) - ValueError: array must not contain infs or NaNstsne.fit_transform(final_embeddings(...) - ValueError: array must not contain infs or NaNs
【发布时间】:2016-11-15 13:52:41
【问题描述】:

我一直在 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下

有什么想法吗?谢谢

【问题讨论】:

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


    【解决方案1】:

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

    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']
    

    【讨论】:

    • 几乎一样,这是我得到的:找到并验证了 text8.zip // 数据大小 17005207 // 最常用的词 (+UNK) [['UNK', 418391], ( 'the', 1061396), ('of', 593677), ('and', 416629), ('one', 411764)] // 样本数据 [5239, 3084, 12, 6, 195, 2, 3137, 46, 59, 156] //
    猜你喜欢
    • 2020-09-16
    • 2020-11-11
    • 2020-07-15
    • 2018-07-16
    • 2016-06-20
    • 2017-12-25
    • 2018-12-23
    • 2013-01-06
    • 2013-10-13
    相关资源
    最近更新 更多