{"action":"opened","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1839","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1839/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1839/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/1839/events","html_url":"https://github.com/tensorflow/tensorflow/issues/1839","id":147244936,"number":1839,"title":"ran word2vec_basic.py and get \"ValueError: array must not contain infs or NaNs\" error","user":{"login":"zhongzyd","id":6659973,"avatar_url":"https://avatars.githubusercontent.com/u/6659973?v=3","gravatar_id":"","url":"https://api.github.com/users/zhongzyd","html_url":"https://github.com/zhongzyd","followers_url":"https://api.github.com/users/zhongzyd/followers","following_url":"https://api.github.com/users/zhongzyd/following{/other_user}","gists_url":"https://api.github.com/users/zhongzyd/gists{/gist_id}","starred_url":"https://api.github.com/users/zhongzyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhongzyd/subscriptions","organizations_url":"https://api.github.com/users/zhongzyd/orgs","repos_url":"https://api.github.com/users/zhongzyd/repos","events_url":"https://api.github.com/users/zhongzyd/events{/privacy}","received_events_url":"https://api.github.com/users/zhongzyd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-10T17:39:43Z","updated_at":"2016-04-10T17:39:43Z","closed_at":null,"body":"I ran word2vec_basic.py, and got \"ValueError: array must not contain infs or NaNs\" error from this line \"low_dim_embs = tsne.fit_transform(final_embeddings[:plot_only,:])\".\r\nThere wasn't any inf or Nan in final_embeddings[:plot_only,:].\r\nI think it is scipy or numpy's issue. \r\nIs there any suggestion for me ?\r\n\r\n### Environment info\r\nOperating System:OS X EI Capitan\r\nunder anaconda python 3.5\r\nnumpy (1.11.0)\r\nscipy (0.17.0)\r\n\r\nInstalled version of CUDA and cuDNN: \r\nDidn't install CUDA.\r\n\r\nIf installed from sources, provide the commit hash:\r\nde5101da4638ac469041575dadb4921ebb33eb6a\r\n\r\n### Steps to reproduce\r\npython3 word2vec_basic.py\r\n\r\n### Logs or other output that would be helpful\r\n\r\nTraceback (most recent call last):\r\n  File \"word2vec_basic.py\", line 237, in <module>\r\n    low_dim_embs = tsne.fit_transform(final_embeddings[:plot_only,:])\r\n  File \"/Users/zhongzyd/anaconda/envs/TensorFlow-master/lib/python3.5/site-packages/sklearn/manifold/t_sne.py\", line 866, in fit_transform\r\n    embedding = self._fit(X)\r\n  File \"/Users/zhongzyd/anaconda/envs/TensorFlow-master/lib/python3.5/site-packages/sklearn/manifold/t_sne.py\", line 777, in _fit\r\n    skip_num_points=skip_num_points)\r\n  File \"/Users/zhongzyd/anaconda/envs/TensorFlow-master/lib/python3.5/site-packages/sklearn/manifold/t_sne.py\", line 832, in _tsne\r\n    params, error, it = _gradient_descent(obj_func, params, **opt_args)\r\n  File \"/Users/zhongzyd/anaconda/envs/TensorFlow-master/lib/python3.5/site-packages/sklearn/manifold/t_sne.py\", line 387, in _gradient_descent\r\n    grad_norm = linalg.norm(grad)\r\n  File \"/Users/zhongzyd/anaconda/envs/TensorFlow-master/lib/python3.5/site-packages/scipy/linalg/misc.py\", line 129, in norm\r\n    a = np.asarray_chkfinite(a)\r\n  File \"/Users/zhongzyd/anaconda/envs/TensorFlow-master/lib/python3.5/site-packages/numpy-1.11.0-py3.5-macosx-10.5-x86_64.egg/numpy/lib/function_base.py\", line 1022, in asarray_chkfinite\r\n    \"array must not contain infs or NaNs\")\r\nValueError: array must not contain infs or NaNs\r\n"}}