未验证 提交 4f2341c0 编写于 作者: G Glenn Jocher 提交者: GitHub

W&B ID reset on training completion (#1852)

上级 84ad6080
......@@ -350,8 +350,8 @@ def non_max_suppression(prediction, conf_thres=0.25, iou_thres=0.45, classes=Non
def strip_optimizer(f='weights/best.pt', s=''): # from utils.general import *; strip_optimizer()
# Strip optimizer from 'f' to finalize training, optionally save as 's'
x = torch.load(f, map_location=torch.device('cpu'))
x['optimizer'] = None
x['training_results'] = None
for key in 'optimizer', 'training_results', 'wandb_id':
x[key] = None
x['epoch'] = -1
x['model'].half() # to FP16
for p in x['model'].parameters():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册