pytorch-semseg icon indicating copy to clipboard operation
pytorch-semseg copied to clipboard

RuntimeError: cuda runtime error (59) : device-side assert triggered at /pytorch/aten/src/THCUNN/generic/ClassNLLCriterion.cu:116

Open victor123499 opened this issue 7 years ago • 2 comments

File "train.py", line 172, in train loss = multi_scale_cross_entropy2d(input=outputs, target=labels, device = device) File "/home/victor/catkin_ws/src/semantic_slam/semantic_cloud/include/ptsemseg/loss.py", line 75, in multi_scale_cross_entropy2d loss = loss + scale_weight[i] * cross_entropy2d(input=inp, target=target, weight=weight, size_average=size_average) File "/home/victor/catkin_ws/src/semantic_slam/semantic_cloud/include/ptsemseg/loss.py", line 30, in cross_entropy2d weight=weight, size_average=False) File "/usr/local/lib/python2.7/dist-packages/torch/nn/functional.py", line 1332, in nll_loss return torch._C._nn.nll_loss(input, target, weight, size_average, ignore_index, reduce) RuntimeError: cuda runtime error (59) : device-side assert triggered at /pytorch/aten/src/THCUNN/generic/ClassNLLCriterion.cu:116

can anyone help me to solve this probelm?

victor123499 avatar Nov 13 '18 09:11 victor123499

check the target is between 0 - N-1 #154

erichhhhho avatar Feb 21 '19 06:02 erichhhhho

is the issue solved ???... I changed the loss.py in which the ignore_index is changed to 250.

zaidzidane avatar Feb 21 '19 09:02 zaidzidane