0
点赞
收藏
分享

微信扫一扫

学习过程中遇到的 部分问题及解决办法

野见 2024-06-29 阅读 30

1.安装build wheel时报错:

The detected CUDA version (12.1) mismatches the version that was used to compile
PyTorch (11.7). Please make sure to use the same CUDA versions.

由于cuda版本和 当前虚拟环境中的pytorch-cudatoolkit版本不同,

解决:

安装好对应低版本cuda 11.7后,在当前命令行输入export CUDA_HOME=/usr/local/cuda-11.7
这样检测cuda版本时用的就是11.7版本,换一个窗口就需要重新export

2.使用yolov10不能resume,即不能从上一次断点继续训练:

解决:在model.py中

1.注释掉
self.model = self.trainer.model在这里插入图片描述
2.在trainer.py中resume_trainning加入ckpt = torch.load(‘./runs/detect/train15/weights/last.pt’)
在这里插入图片描述

3.check_resume函数中将原来的#resume = self.args.resume 改为resume=‘./runs/detect/train15/weights/last.pt’

在这里插入图片描述
4.改完这三个运行成功后记得改回去,否则影响后续重新训练模型

举报

相关推荐

0 条评论