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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mismatch in docs and behavior of align_corners for nn.functional.interpolate #42729
Comments
sending to triage review for some initial opinions |
This is a side effect of 0.3.1 bc compatibility:
0.3.1 is ancient news, so yes, let's just change the default behavior (change code). |
@ailzhang will double check here, but it looks like we can change the behavior (and keep the docs as is.) |
@ORippler Yea for the default value of |
your changes do make sense to me, however are also a BC breaking API change. In the current version, you can call Furthermore, the identical design paradigm (default Imo, a consistent deprecation and API should be chosen to cover all functions that use When the What do you think about my suggestion? Note that I am unfamiliar with the Pytorch internals and may have missed something obvious. Offnote: why is |
馃摎 Documentation
In the docs of
nn.functional.interpolate
it is stated thatalign_corners
is abool
with default valueFalse
. Furthermore, it is stated thatalign_corners
does not affect interpolation modes 'area' as well as 'nearest' .If you look at the implementation however, default of
align_corners
isNone
. Furthermore, when passing abool
foralign_corners
together with interpolation modes 'nearest' or 'area' tonn.functional.interpolate
, a ValueError is raisedThere is thus a clear mismatch between docstrings and implemented behavior of
align_corners
in combination with modes 'nearest' and 'area' fornn.functional.interpolate
. Based on the intended behvaior, either the code or the docstrings should be changed.Related PR that introduced
align_corners
and may clarify originally intended behavior: #5927I would vote for changing the code to adhere to the behavior outlined in the docstrings, and am up to fixing the issue regardless of the made decision.
cc @jlin27 @albanD @mruberry
The text was updated successfully, but these errors were encountered: