Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AMP check tolerance #7937

Merged
merged 1 commit into from
May 23, 2022
Merged

Fix AMP check tolerance #7937

merged 1 commit into from
May 23, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 23, 2022

Adjust to 5%, fixes failing Colab AMP check with V100 (1.5% different) with 200% safety margin.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhanced mixed-precision inference validation in YOLOv5's utility functions.

πŸ“Š Key Changes

  • Changed output format from bounding box corners (xyxy) to normalized bounding box format (xywhn) during inference checks.
  • Tightened the absolute tolerance from 1.0 pixel to 5% (0.05) when comparing FP32 and AMP inference results.

🎯 Purpose & Impact

  • Purpose: To improve the reliability of mixed-precision (AMP) inference checks by using a format (xywhn) that's typically used for evaluating object detection models and making the validation process more stringent.
  • Impact: This change leads to more robust verification of whether mixed-precision inference is functioning correctly without significant deviation from full-precision (FP32) results, potentially improving overall model accuracy and stability. It can also benefit developers and researchers by providing a more reliable assessment method when implementing mixed-precision support in their projects. βš™οΈπŸ“ˆ

Adjust to 5%, fixes failing Colab AMP check with V100 (1.5% different) with 200% safety margin.
@glenn-jocher glenn-jocher self-assigned this May 23, 2022
@glenn-jocher glenn-jocher merged commit 9b4e054 into master May 23, 2022
@glenn-jocher glenn-jocher deleted the update/amp branch May 23, 2022 13:57
tdhooghe pushed a commit to tdhooghe/yolov5 that referenced this pull request Jun 10, 2022
Adjust to 5%, fixes failing Colab AMP check with V100 (1.5% different) with 200% safety margin.
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
Adjust to 5%, fixes failing Colab AMP check with V100 (1.5% different) with 200% safety margin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant