klb3713 / sentence2vec

Tools for mapping a sentence with arbitrary length to vector space
664 stars 225 forks source link

[Bug] AttributeError: 'Word2Vec' object has no attribute 'syn1' #8

Open zhanghao-py opened 9 years ago

zhanghao-py commented 9 years ago

File "/home/zhanghao10/.jumbo/lib/python2.7/threading.py", line 504, in run self.target(_self.__args, *_self.kwargs) File "/home/zhanghao10/sentence2vec-master/word2vec.py", line 855, in worker_train for sent_no, sentence in job) File "/home/zhanghao10/sentence2vec-master/word2vec.py", line 855, in for sent_no, sentence in job) File "/home/zhanghao10/sentence2vec-master/word2vec.py", line 985, in train_sent_vec_sg l2a = deepcopy(model.syn1[word2.point]) # 2d matrix, codelen x layer1_size AttributeError: 'Word2Vec' object has no attribute 'syn1'

the Word2Vec model has attribute 'syn1', please check!