Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dgl_cu111-0.7.1 I use this dgl version and get train errors #34

Open
Juliaququ opened this issue Oct 26, 2021 · 2 comments
Open

dgl_cu111-0.7.1 I use this dgl version and get train errors #34

Juliaququ opened this issue Oct 26, 2021 · 2 comments

Comments

@Juliaququ
Copy link

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

@LawsonAbs
Copy link

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的原因?

@frleez
Copy link

frleez commented Jul 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants