GAIN
GAIN copied to clipboard
dgl_cu111-0.7.1 I use this dgl version and get train errors
Traceback (most recent call last):
File "train.py", line 231, in
Traceback (most recent call last): File "train.py", line 231, in train(opt) File "train.py", line 125, in train predictions = model(words=d['context_idxs'], File "/home/anaconda3/envs/qusiyu/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/data/qusiyu/GAIN-master/code/models/GAIN.py", line 304, in forward encoder_outputs = torch.cat([encoder_outputs, self.entity_type_emb(params['entity_type'])], dim=-1) TypeError: expected Tensor as element 0 in argument 0, but got str
如果使用了较高的cuda和dgl,各个组件的版本都要升级一下吧?你这可能是transformer的原因?
Traceback (most recent call last): File "train.py", line 231, in train(opt) File "train.py", line 125, in train predictions = model(words=d['context_idxs'], File "/home/anaconda3/envs/qusiyu/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "/data/qusiyu/GAIN-master/code/models/GAIN.py", line 304, in forward encoder_outputs = torch.cat([encoder_outputs, self.entity_type_emb(params['entity_type'])], dim=-1) TypeError: expected Tensor as element 0 in argument 0, but got str
Hi! Did you solve it? I'm facing the same problem