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

相关推荐
2401_8604947020 小时前
React Native鸿蒙跨平台开发:error SyntaxError:Unterminated string constant.解决bug错误
javascript·react native·react.js·ecmascript·bug
天才测试猿2 天前
快速定位bug,编写测试用例
自动化测试·软件测试·功能测试·测试工具·职场和发展·测试用例·bug
福大大架构师每日一题3 天前
PyTorch v2.9.1 发布:重要 Bug 修复与性能优化详解
人工智能·pytorch·bug
黑臂麒麟3 天前
Electron&OpenHarmony 跨平台实战开发(bug):npm 安装 Electron 依赖常见错误排查
electron·npm·bug·openharmony
CIb0la3 天前
Complete Bug Bounty tool List for free
linux·运维·bug
欧恩意3 天前
【Viusal Studio】关于增量链接机制
汇编·windows·bug
Austindatabases3 天前
SQLite 开发中的数据库开发规范 --如何提升业务系统性能避免基础BUG
数据库·oracle·sqlite·bug·数据库开发
万粉变现经纪人4 天前
如何解决 pip install 代理报错 407 Proxy Authentication Required 问题
windows·python·pycharm·beautifulsoup·bug·pandas·pip
爱尔兰极光4 天前
软件测试--BUG篇
bug·压力测试·测试
hadage2334 天前
windows alt + tab 切换窗口时会强制把我的中文键盘的中英文输入改为中文这个bug的曲线救国方式 da
bug