-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Description
📚 Documentation
In the docs of nn.functional.interpolate it is stated that align_corners is a bool with default value False. Furthermore, it is stated that align_corners does not affect interpolation modes 'area' as well as 'nearest' .
If you look at the implementation however, default of align_corners is None. Furthermore, when passing a bool for align_corners together with interpolation modes 'nearest' or 'area' to nn.functional.interpolate, a ValueError is raised
There is thus a clear mismatch between docstrings and implemented behavior of align_corners in combination with modes 'nearest' and 'area' for nn.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: #5927
I 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.