RefineDet.PyTorch icon indicating copy to clipboard operation
RefineDet.PyTorch copied to clipboard

RuntimeError: copy_if failed to synchronize: device-side assert triggered

Open Crystal950504 opened this issue 5 years ago • 4 comments

File "train_refinedet.py", line 289, in train() File "train_refinedet.py", line 203, in train odm_loss_l, odm_loss_c = odm_criterion(out, targets) File "/home/shaoyidu/Program/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, **kwargs) File "/home/shaoyidu/Program/LH/RefineDet.PyTorch/layers/modules/refinedet_multibox_loss.py", line 127, in forward loss_c[pos.view(-1,1)] = 0 # filter out pos boxes for now RuntimeError: copy_if failed to synchronize: device-side assert triggered

Crystal950504 avatar Nov 06 '19 09:11 Crystal950504

Excuse me, have you solved this problem?

huangshenneng avatar Dec 22 '19 12:12 huangshenneng

Excuse me, have you solved this problem? hello,have you solved the problem?Thank you!

zeroorhero avatar Feb 09 '20 02:02 zeroorhero

Excuse me, have you solved this problem? hello,have you solved the problem?Thank you!

I've got this issue because the number of classes is defined incorrectly. Make sure to change number of calsses variables and categories variable if you are using a custom dataset. Adding CUDA_LAUNCH_BLOCKING=1 command also helps during debugging.

mhyz1n4 avatar Feb 21 '20 02:02 mhyz1n4

dont have this error when using cuda 10.1, but cuda10.0 will trigger this error

whsun21 avatar Dec 25 '20 03:12 whsun21