fix: Bugfix for align_corners=False
- FX interpolate by gs-olive · Pull Request #1561 · pytorch/TensorRT (original) (raw)
Description
- Improve argument checking and validation to match PyTorch interpolate arguments
- Ensure
align_corners=None
andalign_corners=False
have the same behavior
When user explicitly specifies align_corners=False
as an argument, it is interpreted as True
, since the current check solely checks for the input not being None. The argument check has been updated to check both that the input is not None, but also that it is not False, which is required as per Torch documentation.
Fixes #1558
Type of change
- Bug fix (non-breaking change which fixes an issue)
Checklist:
- [ x ] My code follows the style guidelines of this project (You can use the linters)
- [ x ] I have performed a self-review of my own code
- [ x ] I have commented my code, particularly in hard-to-understand areas and hacks
- [ x ] I have made corresponding changes to the documentation
- [ x ] I have added tests to verify my fix or my feature
- [ x ] New and existing unit tests pass locally with my changes
- [ x ] I have added the relevant labels to my PR in so that relevant reviewers are notified