您好,我运行了主函数里面注释掉掉部分,在函数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.
您好,我运行了主函数里面注释掉掉部分,在函数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.