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

train error #17

Open
ECNUHP opened this issue Feb 10, 2020 · 1 comment
Open

train error #17

ECNUHP opened this issue Feb 10, 2020 · 1 comment

Comments

@ECNUHP
Copy link

ECNUHP commented Feb 10, 2020

hello,I tried your this repo,but I met the following issue:

Traceback (most recent call last):
File "main.py", line 16, in
main()
File "main.py", line 9, in main
trainer.train()
File "/opt/lang.huo/mybot/neural_question_generation/trainer.py", line 81, in train
batch_loss = self.step(train_data)
File "/opt/lang.huo/mybot/neural_question_generation/trainer.py", line 130, in step
logits = self.model.decoder(sos_trg, ext_src_seq, enc_states, enc_outputs, enc_mask)
File "/opt/lang.huo/miniconda3/envs/huopei/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/opt/lang.huo/mybot/neural_question_generation/model.py", line 137, in forward
out, _ = scatter_max(energy, ext_src_seq, out=out)
torch.jit.Error: Exception
The above operation failed in interpreter.
Traceback (most recent call last):
File "/opt/lang.huo/miniconda3/envs/huopei/lib/python3.6/site-packages/torch_scatter/scatter.py", line 19
dim_size: Optional[int]
) -> Tuple[torch.Tensor, torch.Tensor]:
raise ImportError
~~~~~~~~~~~~~~~~~ <--- HERE
return src, index

Could you offer some advice for me ? Thank you in advance!

@seanie12
Copy link
Owner

I think the issue is related to torch-scatter package. Please reinstall the package "torch-scatter".

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

2 participants