You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there, can any one solve this error which I'm getting while running run.py file.
I'm using pre-trained model which is shared in read.me file.
Traceback (most recent call last):
File "D:/vandit/summarize-radiology-findings-master/run.py", line 91, in
main()
File "D:/vandit/summarize-radiology-findings-master/run.py", line 83, in main
sum_words = run(background, findings, trainer, vocab, opt)
File "D:/vandit/summarize-radiology-findings-master/run.py", line 64, in run
preds = trainer.model.predict(src, bg, opt['beam_size'])
File "D:\vandit\summarize-radiology-findings-master\model\copy_model.py", line 234, in predict
enc_inputs = self.embedding(src)
File "D:\vandit\venv\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\vandit\venv\lib\site-packages\torch\nn\modules\sparse.py", line 124, in forward
return F.embedding(
File "D:\vandit\venv\lib\site-packages\torch\nn\functional.py", line 1852, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Input, output and indices must be on the current device
The text was updated successfully, but these errors were encountered:
vanditrogheliyahops
changed the title
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking arugment for argument index in method wrapper_index_select)
RuntimeError: Input, output and indices must be on the current device
Sep 22, 2021
Hey there, can any one solve this error which I'm getting while running run.py file.
I'm using pre-trained model which is shared in read.me file.
Traceback (most recent call last):
File "D:/vandit/summarize-radiology-findings-master/run.py", line 91, in
main()
File "D:/vandit/summarize-radiology-findings-master/run.py", line 83, in main
sum_words = run(background, findings, trainer, vocab, opt)
File "D:/vandit/summarize-radiology-findings-master/run.py", line 64, in run
preds = trainer.model.predict(src, bg, opt['beam_size'])
File "D:\vandit\summarize-radiology-findings-master\model\copy_model.py", line 234, in predict
enc_inputs = self.embedding(src)
File "D:\vandit\venv\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "D:\vandit\venv\lib\site-packages\torch\nn\modules\sparse.py", line 124, in forward
return F.embedding(
File "D:\vandit\venv\lib\site-packages\torch\nn\functional.py", line 1852, in embedding
return torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
RuntimeError: Input, output and indices must be on the current device
The text was updated successfully, but these errors were encountered: