报错

RuntimeError: CUDA error: no kernel image is available for execution on the device

一般是显卡与cuda或者pytorch不适配导致的,可以查看本机或者服务器的cuda版本

nvidia-smi

再到pytorch官网:PyTorch 安装对应版本即可

更多推荐

RuntimeError: CUDA error: no kernel image is available for execution on the devi