-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] fix a bug in input transformation in BaseHead #1843
Conversation
Hi @xinxinxinxu, thanks for your contribution to MMPose! Could you please sign the CLA? It is a necessary step for merging this PR. |
Okay, it's signed. |
Codecov ReportBase: 79.58% // Head: 78.68% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev-1.x #1843 +/- ##
===========================================
- Coverage 79.58% 78.68% -0.90%
===========================================
Files 206 205 -1
Lines 12036 11861 -175
Branches 2035 1995 -40
===========================================
- Hits 9579 9333 -246
- Misses 2017 2118 +101
+ Partials 440 410 -30
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
"""Transform multi scale features into the network input.""" | ||
if not isinstance(feats, Sequence): | ||
return feats |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to warn the user that inputting a bare tensor doesn't meet our convention and the input_transform
argument will be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, the warning has been added
A small modification that applies to different backbone outputs. from issue #1838
Co-authored-by: lupeng <[email protected]>
Co-authored-by: lupeng <[email protected]>
A small modification that applies to different backbone outputs. from issue #1838
Motivation
when I use mmpose 1.0.0 rc to train a new backbone, I find that the output head raises a size unmatching error, which did not happen in the past editions. The main issue is the BaseHead treat output of backbone as a tuple by default, while the output of the backbone i used is a tensor. The positioning of the reported error is ambiguous, which may result in more users consuming some time to locate what the problem is. However, it is only a matter of condition statements.
Modification
Add a condition statements in a private function of BaseHead class (._transform_inputs) :
![image](https://user-images.githubusercontent.com/51226104/204444310-032c4386-acc3-46f0-bc4c-12c188a15252.png)
![image](https://user-images.githubusercontent.com/51226104/204444341-526a1870-3fa6-405e-84cf-575272a5e644.png)
original:
modified
BC-breaking (Optional)
No
Use cases (Optional)
Checklist
Before PR:
After PR: