Traceback (most recent call last):
File "E:/python/spider/svm&lstm/svm/train_svm.py", line 130, in <module>
get_train_vecs(x_train, x_test) # 计算词向量并保存为train_vecs.npy,test_vecs.npy
File "E:/python/spider/svm&lstm/svm/train_svm.py", line 70, in get_train_vecs
train_vecs = np.concatenate([buildWordVector(z, n_dim, imdb_w2v) for z in x_train])
File "E:/python/spider/svm&lstm/svm/train_svm.py", line 70, in <listcomp>
train_vecs = np.concatenate([buildWordVector(z, n_dim, imdb_w2v) for z in x_train])
File "E:/python/spider/svm&lstm/svm/train_svm.py", line 49, in buildWordVector
t = imdb_w2v[word].reshape((1, size))
TypeError: 'Word2Vec' object is not subscriptable