实验室的服务器跑对比实验,晚上走的时候跑的好好地,早上来了重启了,epoch才跑了155,想接着训练。
#(1)导入最后一次的训练结果
model = YOLO('runs/detect/cfg32/weights/last.pt') # load a partially trained model
# (2)重启训练,resume=True
results = model.train(data="ultralytics/cfg/datasets/coco.yaml", epochs=500, batch=64, workers=8, name='cfg',patience=500,resume=True)
# 训练结束评估一下模型
metrics = model.val()