Yolact首次训练模型以及从中断的权重继续训练

首次训练:

python train.py  --config=yolact_coco_custom_config --resume=weights/yolact_plus_resnet50_54_800000.pth --only_last_layer --batch_size 56

首次训练使用了权重文件“yolact_plus_resnet50_54_800000.pth”,但我的样本数量有限,为避免过拟合,所以使用“only_last_layer”参数进行微调(Fine-tune)。

微调:在自己的数据集上训练一个新的深度学习模型时,一般采取在预训练好的模型上进行微调的方法。

batch_size参数:根据官方支持多GPU的说明,我的服务器有7张显卡,batch size = 8*gpu数量。

从中断的权重文件继续训练:

python train.py  --config=yolact_coco_custom_config --resume=weights/yolact_coco_custom_226_9500.pth --start_iter=-1 --batch_size 56

 “yolact_coco_custom_226_9500.pth”是我迭代10万次后得到的权重文件,可在此基础上继续训练。

据说yolact至少训练10万次以上才能得到好的效果,暂未验证。

原文地址:https://www.cnblogs.com/codeit/p/14166513.html