Improved model+EMA checkpointing (#2292)

* Enhanced model+EMA checkpointing

* update

* bug fix

* bug fix 2

* always save optimizer

* ema half

* remove model.float()

* model half

* carry ema/model in fp32

* rm model.float()

* both to float always

* cleanup

* cleanup
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-02-24 18:26:46 -08:00
1 parent ca5b10b759
commit ec1d8496ba
3 files changed
+18 -12

No files matched your search

-1
View File
@@ -272,7 +272,6 @@ def test(data,
if not training:
s = f"\n{len(list(save_dir.glob('labels/*.txt')))} labels saved to {save_dir / 'labels'}" if save_txt else ''
print(f"Results saved to {save_dir}{s}")
model.float() # for training
maps = np.zeros(nc) + map
for i, c in enumerate(ap_class):
maps[c] = ap[i]