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

相关推荐
一只自律的鸡13 小时前
【bug日记】python找不到包
bug
灵性花火13 小时前
记录Qt的多个bug
qt·bug
ss27313 小时前
手写MyBatis第96弹:异常断点精准捕获MyBatis深层BUG
java·开发语言·bug·mybatis
鹓于2 天前
开发Bug——U盘插入断网
bug
今天又在摸鱼3 天前
bug日记
bug
大Mod_abfun3 天前
24H2动态壁纸无法正常嵌入(针对vb.net的紧急加更)
bug·桌面壁纸·24h2
十步杀一人_千里不留行7 天前
和 AI 一起修 Bug 心得体会
人工智能·bug·ai编程
花王江不语7 天前
改bug的一些体会
bug
zimoyin7 天前
Linux 程序使用 STDOUT 打印日志导致程序“假死”?一次线上 Bug 的深度排查与解决
linux·运维·bug
城下秋草8 天前
趣谈Bug -500英里邮件问题
bug