Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyTorch 1.4+ and grid_sample behavior #10

Open
mihaidusmanu opened this issue Jun 18, 2020 · 1 comment
Open

PyTorch 1.4+ and grid_sample behavior #10

mihaidusmanu opened this issue Jun 18, 2020 · 1 comment

Comments

@mihaidusmanu
Copy link

Starting in version 1.4.0 of PyTorch the default behavior of torch.nn.functional.grid_sample was changed to align_corners=False. This might affect the outputting descriptors for certain input image sizes when compared to PyTorch 1.3-. To fix it, one simply needs to modify L281 as follows:

desc = torch.nn.functional.grid_sample(coarse_desc, samp_pts)

desc = torch.nn.functional.grid_sample(coarse_desc, samp_pts, align_corners=True)
@ddetone
Copy link

ddetone commented Sep 22, 2020

Thank you for pointing this out Mihai! It's annoying that they changed the default parameter value.

Unfortunately I don't have write privileges and can't update the code :/ but hopefully people find this

symao added a commit to symao/SuperPointPretrainedNetwork that referenced this issue Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants