-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 warning with torch.meshgrid #1402
Conversation
Refer to open-mmlab/mmdetection#8090 (comment) for discussion on PyTorch version support of |
@pallgeuer Thank you very much for your help! |
d7ac45a
to
2d19d9f
Compare
I have updated the pull request to now correctly deal with PyTorch versions above and below 1.10.0 using a wrapper. Can the PR be reviewed if all is well now? |
Codecov Report
@@ Coverage Diff @@
## master #1402 +/- ##
==========================================
+ Coverage 84.16% 84.34% +0.18%
==========================================
Files 232 232
Lines 19308 19279 -29
Branches 3472 3468 -4
==========================================
+ Hits 16250 16261 +11
+ Misses 2183 2152 -31
+ Partials 875 866 -9
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* Fix warning with torch.meshgrid * Add meshgrid wrapper that is sensitive to torch version * move misc.py from mmpose.utils to mmpose.model.utils Co-authored-by: ly015 <liyining0712@gmail.com>
* Fix warning with torch.meshgrid * Add meshgrid wrapper that is sensitive to torch version * move misc.py from mmpose.utils to mmpose.model.utils Co-authored-by: ly015 <liyining0712@gmail.com>
Motivation
torch.meshgrid()
has started raising a warning when not called with an explicit indexing parameter:https://pytorch.org/docs/stable/generated/torch.meshgrid.html
Modification
Provide
indexing='ij'
to all calls totorch.meshgrid
that don't already specify indexing.Checklist
Before PR:
After PR: