解决ValueError: loaded state dict contains a parameter group that doesn‘t match the size of optimizer‘

使用yolo的时候,训练自己的数据集,报错。尝试了各种办法,终于找到了一个可行的,记录一下。 大家可以试试,照着在命令框中输入,修改权重文件的路径

Found the solution:

Run:

“””

python -c “from utils.general import *; strip_optimizer(‘path/to/best.pt’)”

“””

And then retrain.

This is the case when you continue training with models that have not finished training first.

参考:https://github.com/ultralytics/yolov5/issues/7379

文章出处登录后可见!

已经登录?立即刷新

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
乘风的头像乘风管理团队
上一篇 2022年5月13日
下一篇 2022年5月13日

相关推荐