Skip to content

Explicitly set align_corners=True in calls to grid_sample#21

Open
rlaboiss wants to merge 1 commit intoQiulin-W:masterfrom
rlaboiss:grid-sample-align
Open

Explicitly set align_corners=True in calls to grid_sample#21
rlaboiss wants to merge 1 commit intoQiulin-W:masterfrom
rlaboiss:grid-sample-align

Conversation

@rlaboiss
Copy link
Contributor

Without this commit, the following warning is issued:

"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."

Since "align_corners=False" (the default value) is specified twice in the code, I presume that the places where the argument align_corners are not used are meant to have "align_corners=True". I may be wrong, though.

Without this commit, the following warning is issued:

"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."

Since "align_corners=False" (the default value) is specified twice in the
code, I presume that the places where the argument align_corners are not
used are meant to have "align_corners=True". I may be wrong, though.
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

Successfully merging this pull request may close these issues.

1 participant