Logger Cleanup (#9828)
This commit is contained in:
1 parent
e3ff780676
commit
acff977af3
3 files changed
+2
-16
No files matched your search
+1
-1
@@ -956,7 +956,7 @@ def strip_optimizer(f='best.pt', s=''): # from utils.general import *; strip_op
|
||||
x = torch.load(f, map_location=torch.device('cpu'))
|
||||
if x.get('ema'):
|
||||
x['model'] = x['ema'] # replace model with ema
|
||||
for k in 'optimizer', 'best_fitness', 'wandb_id', 'ema', 'updates': # keys
|
||||
for k in 'optimizer', 'best_fitness', 'ema', 'updates': # keys
|
||||
x[k] = None
|
||||
x['epoch'] = -1
|
||||
x['model'].half() # to FP16
|
||||
|
||||
Reference in new issue
Block a user