在OS X上的Jupyter笔记本中训练doc2vec模型时出现以下错误。虽然我已成功训练模型,但我的当前数据集中的错误是可重现的(尽管它发生的特定线程发生了变化)。其他数据集。
Exception in thread Thread-82:
Traceback (most recent call last):
File "/Users/kevinyang/anaconda/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/Users/kevinyang/anaconda/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/Users/kevinyang/anaconda/lib/python3.5/site-packages/gensim/models/word2vec.py", line 822, in worker_loop
tally, raw_tally = self._do_train_job(sentences, alpha, (work, neu1))
File "/Users/kevinyang/anaconda/lib/python3.5/site-packages/gensim/models/doc2vec.py", line 717, in _do_train_job
doctag_vectors=doctag_vectors, doctag_locks=doctag_locks)
File "gensim/models/doc2vec_inner.pyx", line 428, in gensim.models.doc2vec_inner.train_document_dm (./gensim/models/doc2vec_inner.c:5455)
File "mtrand.pyx", line 1266, in mtrand.RandomState.randint (numpy/random/mtrand/mtrand.c:15836)
RuntimeError: release unlocked lock
Exception in thread Thread-77:
Traceback (most recent call last):
File "/Users/kevinyang/anaconda/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/Users/kevinyang/anaconda/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/Users/kevinyang/anaconda/lib/python3.5/site-packages/gensim/models/word2vec.py", line 822, in worker_loop
tally, raw_tally = self._do_train_job(sentences, alpha, (work, neu1))
File "/Users/kevinyang/anaconda/lib/python3.5/site-packages/gensim/models/doc2vec.py", line 717, in _do_train_job
doctag_vectors=doctag_vectors, doctag_locks=doctag_locks)
File "gensim/models/doc2vec_inner.pyx", line 458, in gensim.models.doc2vec_inner.train_document_dm (./gensim/models/doc2vec_inner.c:5963)
File "mtrand.pyx", line 1266, in mtrand.RandomState.randint (numpy/random/mtrand/mtrand.c:15836)
RuntimeError: release unlocked lock