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

相关推荐
鸽芷咕4 小时前
【Python报错已解决】xlrd.biffh.XLRDError: Excel xlsx file; not supported
开发语言·python·机器学习·bug·excel
鸽芷咕11 小时前
【Python报错已解决】ModuleNotFoundError: No module named ‘tensorflow‘
python·机器学习·tensorflow·bug·neo4j
鸽芷咕1 天前
【Python报错已解决】python setup.py bdist_wheel did not run successfully.
开发语言·python·机器学习·bug
Tatakai251 天前
Mybatis Plus分页查询返回total为0问题
java·spring·bug·mybatis
鸽芷咕1 天前
【Python报错已解决】libpng warning: iccp: known incorrect sRGB profile
开发语言·python·机器学习·bug
鸽芷咕1 天前
【Python报错已解决】ModuleNotFoundError: No module named ‘paddle‘
开发语言·python·机器学习·bug·paddle
腾飞的信仰3 天前
如何快速解决程序中的BUG
bug
Everglowwwwww3 天前
【bug】通过lora方式微调sdxl inpainting踩坑
学习·计算机视觉·ai作画·stable diffusion·bug
数据最前线3 天前
创建索引遇到这个Bug,19c中还没有修复
oracle·bug
CV金科4 天前
蓝桥杯-STM32G431RBT6(UART解析字符串sscanf和解决串口BUG)
c语言·stm32·单片机·嵌入式硬件·mcu·算法·bug