-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
CUDA error: an illegal memory access was encountered #270
Comments
Hi @bkbjsd |
I check it and retry several times。—— seems not the num_classes problem。 Run: (py38_source) # mmsegmentation_ python tools/train.py --no-validate configs/luke/pspnet_ABCDataset.py 2020-11-24 14:53:47,964 - mmseg - INFO - Environment info: sys.platform: linux
TorchVision: 0.9.0.dev20201118 2020-11-24 14:53:47,964 - mmseg - INFO - Distributed training: False 2020-11-24 14:53:49,047 - mmseg - WARNING - The model and loaded state dict do not match exactly unexpected key in source state_dict: fc.weight, fc.bias 2020-11-24 14:53:49,049 - mmseg - INFO - EncoderDecoder( Running Error Message:2020-11-24 14:53:49,090 - mmseg - INFO - Loaded 26494 images size mismatch for decode_head.conv_seg.weight: copying a param with shape torch.Size([19, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([38, 512, 1, 1]). import torch ConvolutionParams terminate called after throwing an instance of 'c10::Error' [2] 9376 abort (core dumped) python tools/train.py --no-validate configs/luke/pspnet_ABCDataset.py |
Hi @bkbjsd, I met the same problem. Did you solve it? I have even the same error message. |
I have met the same issue, it almost may the 'num_classes' not match with your label index, I suggest you have to carefully check your label index of ground truth and the num_classes config of the model. For example, if your ground truth label index range from 0 to 19(include), you have to set the num_classes to 20. |
I have encountered the same problem and solved it. I'm sure the problem is from the dataset. Take a closer look at the category range of tags in the dataset and num_classes in the configuration file. Notice the use of ignore_index in dataset implement, does it contain unlabeled data? |
I also encontered it and solved it. You may check whther your label data's index is satisfied with your num_classes. Except the ignore index, all of them should be 0~num_classes-1 |
Hi Nick, thanks a lot for your replies. It really solves my problem. But could you please further explain what does "Except the ignore index, all of them should be 0~num_classes-1" mean? I mean how to implement the ignore index? Thanks a lot. |
Because I did not use the ignore index, you may check it's code about ignore index, I remember it's 255 |
* Support K-LMS in img2img * Apply review suggestions
The text was updated successfully, but these errors were encountered: