YOLOv5 设置学习率等超参

YOLOv5 设置学习率等超参需要在超参配置文件中设置

parser.add_argument('--hyp', type=str, default=ROOT / 'data/hyps/hyp.scratch-low.yaml', help='hyperparameters path')

yolov5/data/hyps/hyp.scratch-low.yaml文件中可以看到

lr0: 0.01 # initial learning rate (SGD=1E-2, Adam=1E-3)
lrf: 0.01 # final OneCycleLR learning rate (lr0 * lrf)

设置超参文件后,运行命令

python  train.py *** --hyp ./data/hyps/hyp.det.yaml

即可

猜你喜欢

转载自blog.csdn.net/chan1987818/article/details/131122163