You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
您好,我想对您的项目做一些实验,增加了一个模块用到了 def label_onehot(inputs, num_segments): batch_size, im_h, im_w = inputs.shape # remap invalid pixels (-1) into 0, otherwise we cannot create one-hot vector with negative labels. # we will still mask out those invalid values in valid mask inputs = torch.relu(inputs) outputs = torch.zeros([batch_size, num_segments, im_h, im_w]).to(inputs.device) return outputs.scatter_(1, inputs.unsqueeze(1), 1.0)
这一函数。运行的时候报错RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1. 定位后报错出现在了上面这段函数。具体为: File "unimatch.py", line 288, in <module> main() File "unimatch.py", line 209, in main mask_l = F.interpolate(label_onehot(mask_x, 19),size=preds.shape[2:], mode='nearest') File "/root/UniMatch2/supervised.py", line 95, in label_onehot return outputs.scatter_(1, inputs.unsqueeze(1), 1.0) RuntimeError: CUDA error: device-side assert triggered请问您知道如何解决嘛?
The text was updated successfully, but these errors were encountered:
您好,我想对您的项目做一些实验,增加了一个模块用到了
def label_onehot(inputs, num_segments): batch_size, im_h, im_w = inputs.shape # remap invalid pixels (-1) into 0, otherwise we cannot create one-hot vector with negative labels. # we will still mask out those invalid values in valid mask inputs = torch.relu(inputs) outputs = torch.zeros([batch_size, num_segments, im_h, im_w]).to(inputs.device) return outputs.scatter_(1, inputs.unsqueeze(1), 1.0)
这一函数。运行的时候报错RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1. 定位后报错出现在了上面这段函数。具体为:
File "unimatch.py", line 288, in <module> main() File "unimatch.py", line 209, in main mask_l = F.interpolate(label_onehot(mask_x, 19),size=preds.shape[2:], mode='nearest') File "/root/UniMatch2/supervised.py", line 95, in label_onehot return outputs.scatter_(1, inputs.unsqueeze(1), 1.0) RuntimeError: CUDA error: device-side assert triggered
请问您知道如何解决嘛?The text was updated successfully, but these errors were encountered: