Hi, when I train Quora dataset I got errors like below:
epoch: 1
Traceback (most recent call last):
File "train.py", line 151, in <module>
main()
File "train.py", line 141, in main
best_model = train(args, data)
File "train.py", line 70, in train
pred = model(**kwargs)
File "/media/gaoya/disk/Applications/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in __call__
result = self.forward(*input, **kwargs)
File "/media/gaoya/disk/Applications/pytorch/NLP/BIMPM-pytorch-master/model/BIMPM.py", line 219, in forward
p = self.word_emb(kwargs['p'])
File "/media/gaoya/disk/Applications/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 547, in __call__
result = self.forward(*input, **kwargs)
File "/media/gaoya/disk/Applications/anaconda3/lib/python3.7/site-packages/torch/nn/modules/sparse.py", line 114, in forward
self.norm_type, self.scale_grad_by_freq, self.sparse)
File "/media/gaoya/disk/Applications/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py", line 1467, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Expected object of backend CUDA but got backend CPU for argument #3 'index'
Hi, when I train Quora dataset I got errors like below:
Can someone help me fix it?