Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gensim version? #1

Open
bluesky632 opened this issue Nov 27, 2018 · 1 comment
Open

gensim version? #1

bluesky632 opened this issue Nov 27, 2018 · 1 comment

Comments

@bluesky632
Copy link

run data_preprocessing.ipynb has a error:

w2v_vocab, w2v_model = create_embeddings(train_sent_texts,
embeddings_path='../embeddings/text_embeddings.gensimmodel',
vocab_path='../embeddings/text_mapping.json',
size=300,
workers=4,
iter=20)

@bluesky632
Copy link
Author

Traceback (most recent call last):
File "D:\Anaconda3\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "D:\Anaconda3\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "D:\Anaconda3\lib\site-packages\gensim\models\word2vec.py", line 806, in worker_loop
tally, raw_tally = self._do_train_job(sentences, alpha, (work, neu1))
File "D:\Anaconda3\lib\site-packages\gensim\models\word2vec.py", line 742, in _do_train_job
tally += train_batch_cbow(self, sentences, alpha, work, neu1)
File "D:\Anaconda3\lib\site-packages\gensim\models\word2vec.py", line 161, in train_batch_cbow
train_cbow_pair(model, word, word2_indices, l1, alpha)
File "D:\Anaconda3\lib\site-packages\gensim\models\word2vec.py", line 303, in train_cbow_pair
fb = sigmoid(dot(l1, l2b.T)) # propagate hidden -> output
File "D:\Anaconda3\lib\site-packages\gensim\models\word2vec.py", line 277, in sigmoid
if p > 0:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant