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

Hub device mismatch bug fix #1594

Merged
merged 1 commit into from
Dec 6, 2020
Merged

Hub device mismatch bug fix #1594

merged 1 commit into from
Dec 6, 2020

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Dec 6, 2020

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved device handling in non_max_suppression function.

πŸ“Š Key Changes

  • Changed the reference to the number of classes nc for consistency.
  • Specified device argument when creating zero tensors, ensuring they're created on the same device as prediction.

🎯 Purpose & Impact

  • Ensures that the class count (nc) is always accurately derived from the input predictions' shape.
  • The update ensures that tensors created during non_max_suppression are allocated on the same hardware (CPU or GPU) as the input, leading to performance improvements and avoiding unnecessary device transfers which can be a bottleneck.
  • This impacts users by potentially speeding up the non_max_suppression step of object detection, resulting in faster inferencing times and smoother integration with hardware accelerators like GPUs. πŸš€

@glenn-jocher glenn-jocher merged commit e285034 into master Dec 6, 2020
@glenn-jocher glenn-jocher deleted the mismatch branch December 6, 2020 17:01
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.

1 participant