I got a runtime error when loading Glove Amazon word vector in multi_channel mode. The traceback is listed below.
Traceback (most recent call last):
File "sentiment.py", line 466, in <module>
main()
File "sentiment.py", line 238, in main
glove_vocab, glove_emb = load_word_vectors(emb_vector_path2, emb_split_token)
File "/Users/lihongyi/Tree_CNN_LSTM-master/utils.py", line 34, in load_word_vectors
vectors[idx] = torch.Tensor(map(float, contents[1:]))
RuntimeError: The expanded size of the tensor (1) must match the existing size (300) at non-singleton dimension 0
When I replace Glove Amazon with Glove Common Crawl on second channel, it works and no error. But Glove Amazon is too large to open so I can't find out the problem.
I got a runtime error when loading Glove Amazon word vector in multi_channel mode. The traceback is listed below.
When I replace Glove Amazon with Glove Common Crawl on second channel, it works and no error. But Glove Amazon is too large to open so I can't find out the problem.