深度学习训练问题
2025/8/28小于 1 分钟
error: unrecognized arguments: --local-rank=0
- 原因
local-rank参数的问题,Torch2.0 该参数从local_rank换成了local-rank - 解决
- 修改训练代码里面的参数名字
RuntimeError: CUDA error: invalid device ordinal
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.
- 可能原因
CUDA_VISIBLE_DEVICES 和 torch.cuda.set_device()冲突 - 解决
修改一下显卡序号
accimage
原accimage仓库被遗弃,可以通过conda-forge安装
conda install -c conda-forge accimage
numpy>2
安装低于2版本的numpy需要同步更改opencv版本
numpy==1.26.4
opencv-python==4.10.0.84