align_corners function parameter is inconsistent between grid_sample and interpolate method
TechieBoy opened this issue · 1 comments
In the current code, grid_sample()
is not passed the align_corners
parameter so it is set to True as described here
Line 61 in 1a5f196
However, interpolate()
has align_corners
set to False.
Line 299 in 1a5f196
From the pytorch docs:
The align_corners
option parallels the align_corners
option in interpolate()
, and so whichever option is used here should also be used there to resize the input image before grid sampling.
Is this intended? If not, then align_corners=False
needs to be passed in to the grid_sample()
function.
Thank you for bringing this to my attention, I changed the grid sampler to align_corners=True
since this is what the reference implementation does (and the provided models were trained with this configuration). I appreciate that you bring it up since the default changed to align_corners=False
with the newest PyTorch release, which breaks backwards compatibility: pytorch/pytorch#23923