Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

训练时间 #25

Open
1 task done
xiangyun-hz opened this issue Mar 21, 2022 · 2 comments
Open
1 task done

训练时间 #25

xiangyun-hz opened this issue Mar 21, 2022 · 2 comments
Labels
question Further information is requested

Comments

@xiangyun-hz
Copy link

Search before asking

Question

使用yolov5s,3090显卡,batch=64,epoch=300,单卡和8卡大家训练时间分别多少?我8卡怎么要25小时,这个正常吗?

Additional

No response

@xiangyun-hz xiangyun-hz added the question Further information is requested label Mar 21, 2022
@github-actions
Copy link

👋 你好 @qiuhongxiang, 如有任何问题,请首先检查你的运行指令有没有问题,如果指令没有问题,请尝试更新作者仓库的最新代码:

  # 如果没下载官方代码
  $ git clone https://github.com/ultralytics/yolov5.git
  $ cd yolov5
  $ pip install -r requirements.txt
  # 如果已下载官方代码
  $ cd yolov5
  $ git reset --hard
  $ git pull
  $ pip install -r requirements.txt

更多请参考⭐️英文官方教程

依赖

Python版本3.6或更高,python依赖库都在requirements.txt 里面,直接pip install -r requirements.txt即可。
如果你使用Windows的话,尽量使用CUDA10.2和对应版本的pytorch,CUDA11+会有些许问题。

环境

下面是已经配置好环境的免费GPU训练环境:

@wudashuo
Copy link
Owner

训练时间不光看你batch sizeepoch,最主要看你数据集的大小,你数据集要是10万张,那一周都正常;要是10张,可能十几分钟就跑完了。
另外,使用DDP模式要比普通DP模式更快。
DP模式(不推荐):
$ python3 train.py --batch 64 --data coco.yaml --weights yolov5s.pt --device 0,1,2,3
DDP模式(推荐):
$ python3 -m torch.distributed.launch --nproc_per_node 4 train.py --batch 64 --data coco.yaml --weights yolov5s.pt --device 0,1,2,3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants