EMA bug fix #279
This commit is contained in:
1 parent
a9d20eba3e
commit
df224a0d8f
2 files changed
+11
-14
No files matched your search
@@ -294,7 +294,7 @@ def train(hyp):
|
||||
batch_size=batch_size,
|
||||
imgsz=imgsz_test,
|
||||
save_json=final_epoch and opt.data.endswith(os.sep + 'coco.yaml'),
|
||||
model=ema.ema.module if hasattr(model, 'module') else ema.ema,
|
||||
model=ema.ema,
|
||||
single_cls=opt.single_cls,
|
||||
dataloader=testloader)
|
||||
|
||||
@@ -324,7 +324,7 @@ def train(hyp):
|
||||
ckpt = {'epoch': epoch,
|
||||
'best_fitness': best_fitness,
|
||||
'training_results': f.read(),
|
||||
'model': ema.ema.module if hasattr(model, 'module') else ema.ema,
|
||||
'model': ema.ema,
|
||||
'optimizer': None if final_epoch else optimizer.state_dict()}
|
||||
|
||||
# Save last, best and delete
|
||||
|
||||
Reference in new issue
Block a user