Replace 2 transpose() with 1 permute in TransformerBlock()`#5645
Merged
glenn-jocher merged 1 commit intoultralytics:masterfrom Nov 15, 2021
Merged
Replace 2 transpose() with 1 permute in TransformerBlock()`#5645glenn-jocher merged 1 commit intoultralytics:masterfrom
transpose() with 1 permute in TransformerBlock()`#5645glenn-jocher merged 1 commit intoultralytics:masterfrom
Conversation
permute() instead of 2 transpose() in Transformer C3TR()
permute() instead of 2 transpose() in Transformer C3TR()permute() instead of 2 transpose() in TransformerBlock()`
Member
|
/rebase |
e9add03 to
61e1cbc
Compare
permute() instead of 2 transpose() in TransformerBlock()`transpose() with 1 permute in TransformerBlock()`
Member
|
@dingyiwei PR is merged. Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐ |
Merged
BjarneKuehl
pushed a commit
to fhkiel-mlaip/yolov5
that referenced
this pull request
Aug 26, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in the comment of #2329, using
permute()to change dimensions of the feature inTransformerBlockinstead of 2transpose()s looks more elegant and readable.🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Enhanced tensor manipulation for efficiency in YOLOv5 models.
📊 Key Changes
unsqueeze,transpose,squeeze) with a singlepermuteoperation.🎯 Purpose & Impact