tom-roddick / oft

MIT License
200 stars 50 forks source link

grid_sample() behavior changed in pytorch #15

Open photonman86 opened 3 years ago

photonman86 commented 3 years ago

running OFT gets me the following warnings: torch/nn/functional.py:3828: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.

I use pytorch 1.4 (as this project does not include a conda environment / pip requirements file, I just tried current standard setup)

my question: what is the target pytorch version? OR: in oft.py: OFT.forward(), does the F.grid_sample(..) need to have align_corners set to True or False?

IAMShashankk commented 2 years ago

@photonman86 What is the solution that worked for you in this case?