报错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标签个数超过了设定的类别数。

相关推荐
WBingJ1 天前
记录一次薛定谔bug
python·opencv·bug
普宁彭于晏2 天前
uni-app switch(开关选择器) BUG
uni-app·bug
!chen4 天前
Oracle 19.20未知BUG导致oraagent进程内存泄漏
数据库·oracle·bug
SAP龙哥6 天前
SAP在未启用负库存的情况下,库存却出现了负数-补充S4 1709 BUG
运维·bug
lxmyzzs7 天前
【已解决】YOLO11模型转wts时报错:PytorchStreamReader failed reading zip archive
人工智能·python·深度学习·神经网络·目标检测·计算机视觉·bug
JHCan3337 天前
一个没有手动加分号引发的bug
前端·javascript·bug
lxmyzzs7 天前
【已解决】Jetson Orin NX apt更换国内源
嵌入式硬件·计算机视觉·bug
JAVA学习通7 天前
【测试开发】---Bug篇
bug
兰琛7 天前
android 小bug :文件冲突的问题
android·学习·bug
GeminiJM7 天前
一次粗心导致的bug定位
前端·chrome·bug