EMA FP32 assert classification bug fix (#9016)
* Return EMA float on classification val * verbose val fix * EMA check
This commit is contained in:
1 parent
529aafd737
commit
20049be2e7
5 files changed
+14
-11
No files matched your search
+2
-1
@@ -116,7 +116,7 @@ def run(
|
||||
if verbose: # all classes
|
||||
LOGGER.info(f"{'Class':>24}{'Images':>12}{'top1_acc':>12}{'top5_acc':>12}")
|
||||
LOGGER.info(f"{'all':>24}{targets.shape[0]:>12}{top1:>12.3g}{top5:>12.3g}")
|
||||
for i, c in enumerate(model.names):
|
||||
for i, c in model.names.items():
|
||||
aci = acc[targets == i]
|
||||
top1i, top5i = aci.mean(0).tolist()
|
||||
LOGGER.info(f"{c:>24}{aci.shape[0]:>12}{top1i:>12.3g}{top5i:>12.3g}")
|
||||
@@ -127,6 +127,7 @@ def run(
|
||||
LOGGER.info(f'Speed: %.1fms pre-process, %.1fms inference, %.1fms post-process per image at shape {shape}' % t)
|
||||
LOGGER.info(f"Results saved to {colorstr('bold', save_dir)}")
|
||||
|
||||
model.float() # for training
|
||||
return top1, top5, loss
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user