报错For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

.报错For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

/aten/src/ATen/native/cuda/NLLLoss2d.cu:103: nll_loss2d_forward_kernel: block: [29,0,0], thread: [707,0,0] Assertion t >= 0 && t < n_classes failed.

报错信息如下:

./aten/src/ATen/native/cuda/NLLLoss2d.cu:103: nll_loss2d_forward_kernel: block: [29,0,0], thread: [707,0,0] Assertion t >= 0 && t < n_classes failed.

。。。。。。

。。。。。。

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.

Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

模型运行训练,可到epoch=9 ,报错

删除models/__pycache__下的缓存文件,重新运行数据集,还是会报错。

解决方案:

是标签有问题,有一张图片标签坏了,某张图片的label标签个数超过了设定的类别数。

相关推荐
hello_2502 天前
bug排查思路大纲
bug
秃头小饼干2 天前
关于Bug排查日记的技术文章大纲
bug
烧冻鸡翅QAQ2 天前
测试中的Bug
bug·测试
云和数据.ChenGuang3 天前
java常见SSL bug解决方案
java·bug·ssl
cat_with_cat3 天前
测试:BUG篇
bug·测试
黑客飓风3 天前
Bug排查日记的技术
bug
Wiktok4 天前
[Wit]CnOCR模型训练全流程简化记录(包括排除BUG)
python·深度学习·bug
玄尺_0074 天前
bug:uniCloud报Business Failed, 参数有误retry invoke error
数据库·bug
程序猿阿伟4 天前
《云原生边缘与AI训练场景:2类高频隐蔽Bug的深度排查与架构修复》
人工智能·云原生·bug
夕阳UPdz4 天前
深入探索 Unity 错误排查过程:从“滚动条问题”到“鼠标悬浮异常”
bug