We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf3fb58 commit 9b4e054Copy full SHA for 9b4e054
utils/general.py
@@ -520,10 +520,10 @@ def check_amp(model):
520
LOGGER.warning(emojis(f'{prefix}checks skipped ⚠️, not online.'))
521
return True
522
m = AutoShape(model, verbose=False) # model
523
- a = m(im).xyxy[0] # FP32 inference
+ a = m(im).xywhn[0] # FP32 inference
524
m.amp = True
525
- b = m(im).xyxy[0] # AMP inference
526
- if (a.shape == b.shape) and torch.allclose(a, b, atol=1.0): # close to 1.0 pixel bounding box
+ b = m(im).xywhn[0] # AMP inference
+ if (a.shape == b.shape) and torch.allclose(a, b, atol=0.05): # close to 5% absolute tolerance
527
LOGGER.info(emojis(f'{prefix}checks passed ✅'))
528
529
else:
0 commit comments