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

multiple GPUs error #37

Open
qizitong opened this issue May 16, 2020 · 2 comments
Open

multiple GPUs error #37

qizitong opened this issue May 16, 2020 · 2 comments

Comments

@qizitong
Copy link

Traceback (most recent call last):
File "main.py", line 86, in
train(config)
File "/home/caoxing/project/hotpot-master/run.py", line 110, in train
logit1, logit2, predict_type, predict_support = model(context_idxs, ques_idxs, context_char_idxs, ques_char_idxs, context_lens, start_mapping, end_mapping, all_mapping, return_yp=False)
File "/home/caoxing/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/caoxing/miniconda3/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 155, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/home/caoxing/miniconda3/lib/python3.7/site-packages/torch/nn/parallel/data_parallel.py", line 165, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/home/caoxing/miniconda3/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 85, in parallel_apply
output.reraise()
File "/home/caoxing/miniconda3/lib/python3.7/site-packages/torch/_utils.py", line 395, in reraise
raise self.exc_type(msg)
IndexError: Caught IndexError in replica 0 on device 0.
Original Traceback (most recent call last):
File "/home/caoxing/miniconda3/lib/python3.7/site-packages/torch/nn/parallel/parallel_apply.py", line 60, in _worker
output = module(*input, **kwargs)
File "/home/caoxing/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/caoxing/project/hotpot-master/sp_model.py", line 85, in forward
context_output = self.rnn(context_output, context_lens)
File "/home/caoxing/miniconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/home/caoxing/project/hotpot-master/sp_model.py", line 187, in forward
hidden = self.get_init(bsz, i)
File "/home/caoxing/project/hotpot-master/sp_model.py", line 178, in get_init
return self.init_hidden[i].expand(-1, bsz, -1).contiguous()
File "/home/caoxing/miniconda3/lib/python3.7/site-packages/torch/nn/modules/container.py", line 402, in getitem
idx = self._get_abs_string_index(idx)
File "/home/caoxing/miniconda3/lib/python3.7/site-packages/torch/nn/modules/container.py", line 393, in _get_abs_string_index
raise IndexError('index {} is out of range'.format(idx))
IndexError: index 0 is out of range

@Wooden-Atong
Copy link

Hello,I have the same error. I am very anxious. Have you solved this problem now? If it has been solved, please help me and tell me the solution.

@qizitong
Copy link
Author

qizitong commented Sep 12, 2022 via email

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