glenn-jocher commited on
Commit
d9b64c2
1 Parent(s): 9fdb0fb

save ckpt in FP16 #119

Browse files
Files changed (1) hide show
  1. train.py +1 -1
train.py CHANGED
@@ -332,7 +332,7 @@ def train(hyp):
332
  ckpt = {'epoch': epoch,
333
  'best_fitness': best_fitness,
334
  'training_results': f.read(),
335
- 'model': ema.ema.module if hasattr(model, 'module') else ema.ema,
336
  'optimizer': None if final_epoch else optimizer.state_dict()}
337
 
338
  # Save last, best and delete
 
332
  ckpt = {'epoch': epoch,
333
  'best_fitness': best_fitness,
334
  'training_results': f.read(),
335
+ 'model': ema.ema.module.half() if hasattr(model, 'module') else ema.ema.half(),
336
  'optimizer': None if final_epoch else optimizer.state_dict()}
337
 
338
  # Save last, best and delete