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

出现报错RuntimeError: CUDA error: an illegal memory access was encountered #236

Open
HanazawaKanana opened this issue Oct 21, 2020 · 3 comments

Comments

@HanazawaKanana
Copy link

Traceback (most recent call last):
File "train.py", line 199, in
cost = trainBatch(crnn, criterion, optimizer)
File "train.py", line 186, in trainBatch
cost.backward()
File "/home/zhangmingzhou1/anaconda3/envs/torch/lib/python3.6/site-packages/torch/tensor.py", line 195, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "/home/zhangmingzhou1/anaconda3/envs/torch/lib/python3.6/site-packages/torch/autograd/init.py", line 99, in backward
allow_unreachable=True) # allow_unreachable flag
File "/home/zhangmingzhou1/anaconda3/envs/torch/lib/python3.6/site-packages/torch/autograd/function.py", line 77, in apply
return self._forward_cls.backward(self, *args)
File "/home/zhangmingzhou1/anaconda3/envs/torch/lib/python3.6/site-packages/warpctc_pytorch-0.1-py3.6-linux-x86_64.egg/warpctc_pytorch/init.py", line 51, in backward
_grad_output = grad_output.to(ctx.grads.device)
RuntimeError: CUDA error: an illegal memory access was encountered

@fantasyfulan
Copy link

我训练时也出现了类似的错误,请问你这个错误解决了吗。

@alnah005
Copy link

Try decreasing batch size. Sources: pytorch/pytorch#46974 and pytorch/pytorch#21819

@sssimpleboy
Copy link

Try decreasing batch size. Sources: pytorch/pytorch#46974 and pytorch/pytorch#21819

my batchsize is one,but failed

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

4 participants