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 torch long to float tensor on HUB macOS #8067

Merged
merged 1 commit into from
Jun 1, 2022
Merged

Fix torch long to float tensor on HUB macOS #8067

merged 1 commit into from
Jun 1, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jun 1, 2022

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refinement of anchor handling in loss computation for object detection.

πŸ“Š Key Changes

  • Combined two lines of code to simplify how anchors and tensor shapes are assigned.
  • Replaced hardcoded gain indices with the actual shape of prediction tensor for grid clamping.

🎯 Purpose & Impact

  • The purpose of these changes is to enhance code readability and maintainability by reducing complexity.
  • This could potentially minimize bugs related to tensor indexing and make it easier to understand how anchor boxes are used during loss computation.
  • Impact to users includes a clearer understanding of the inner mechanics of the model's loss function, which can aid in debugging and extending the code.

@glenn-jocher glenn-jocher self-assigned this Jun 1, 2022
@glenn-jocher glenn-jocher merged commit 7cef03d into master Jun 1, 2022
@glenn-jocher glenn-jocher deleted the fix/hub branch June 1, 2022 15:34
tdhooghe pushed a commit to tdhooghe/yolov5 that referenced this pull request Jun 10, 2022
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
Mindstan pushed a commit to PsycleResearch/yolov5 that referenced this pull request Sep 13, 2022
Mindstan added a commit to PsycleResearch/yolov5 that referenced this pull request Sep 15, 2022
* Use poetry

* Only use Python >= 3.9

* Moved to PyTorch 1.12

* Bump version

* PyTorch 1.11.0 compatibility updates (ultralytics#6932)

Resolves `AttributeError: 'Upsample' object has no attribute 'recompute_scale_factor'` first raised in ultralytics#5499

* Bump beta version

* Fix torch `long` to `float` tensor on HUB macOS (ultralytics#8067)

* Bump beta version

* Updated Makefile

* Added README

* Added missing VERSION

* Final major version

Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
corey-nm added a commit to neuralmagic/yolov5 that referenced this pull request Oct 26, 2022
bfineran pushed a commit to neuralmagic/yolov5 that referenced this pull request Oct 26, 2022
WasabiFan pushed a commit to WasabiFan/edgeai-yolov5 that referenced this pull request Dec 11, 2022
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.

RuntimeError: result type Float can't be cast to the desired output type long int
1 participant