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

运行遇到错误 #13

Open
wanesta opened this issue Nov 29, 2017 · 1 comment
Open

运行遇到错误 #13

wanesta opened this issue Nov 29, 2017 · 1 comment

Comments

@wanesta
Copy link

wanesta commented Nov 29, 2017

您好,我运行了主函数里面注释掉掉部分,在函数get_train_vecs 里面得到这个错误·~~。
get_train_vecs(x_train,x_test) #计算词向量并保存为train_vecs.npy,test_vecs.npy
File "code/Sentiment_svm.py", line 55, in get_train_vecs
imdb_w2v.train(x_train)
File "/data/home/guanggao/anaconda2/lib/python2.7/site-packages/gensim/models/word2vec.py", line 813, in train
raise ValueError("You must specify either total_examples or total_words, for proper alpha and progress calculations. The usual value is total_examples=model.corpus_count.")
ValueError: You must specify either total_examples or total_words, for proper alpha and progress calculations. The usual value is total_examples=model.corpus_count.

@Aurora1979
Copy link

改为imdb_w2v.train(x_train, total_examples=imdb_w2v.corpus_count, epochs=imdb_w2v.iter)

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

2 participants