简体   繁体   English

yolov5:我可以在已经完成自定义训练的 model 上添加更多 epoch 吗?

[英]yolov5 : Can i add more epochs on the model already done custom training?

I'm trying to make image detection model with 30,000 images.我正在尝试使用 30,000 张图像进行图像检测 model。 I just tried 5 epochs which took about 5 hours of training.我刚刚尝试了 5 个 epoch,大约需要 5 个小时的训练。

The question is, if I want to simply add more epochs on the same model, how can i do that?问题是,如果我想在同一个 model 上简单地添加更多时期,我该怎么做? Is there a way that I can load custom trained model?有没有办法可以加载经过自定义训练的 model?

Since it takes so long, I wish I can continue training from 5 epochs already done training.由于需要这么长时间,我希望我可以从已经完成训练的 5 个 epoch 继续训练。 I'm using colab, and I experienced a few times loosing connection during the training so I'm afraid of giving more epochs from the start of training.我正在使用 colab,我在训练期间经历了几次失去联系,所以我害怕从训练开始就给出更多的 epoch。

Yes, you can use the standard yolo training command and provide the path to your previously training model in the -- weights paramater.是的,您可以使用标准的 yolo 训练命令,并在 --weights 参数中提供您之前训练 model 的路径。

!python train.py --img 960 --batch 20 --epochs 10 --data dataset.yaml --weights your_model.pt --cache --exist-ok

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM