服务器端跑代码很慢的原因

今天跑了一下yolov5的一个代码,只训练了200多张图片,但是一开始一个epoch训练了一分钟,仔细检查命令行后发现没有使用gpu

同时报错:skipping check (not a git repository), for updates see https://github.com/ultralytics/yolov5 /home/liuzhen/miniconda3/envs/yolov5/lib/python3.9/site-packages/torch/cuda/__init__.py:107: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 10020). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:109.)

这里的原因就是cuda 版本和pytorch的版本不匹配导致的

由于服务器端的驱动不好安装,这里只需要将你的项目的pytorch版本替换即可

命令行输入nvidia-smi查看cuda版本,我这里是10.2

在下面链接找到对应的pytorch版本

Previous PyTorch Versions | PyTorch

同时最好检查一下pytorch的版本符不符合项目要求

远程pip搭建环境即可

最后,八张卡同时训练,飞一般的感觉!

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值