Skip to content

Conversation

fmassa
Copy link
Member

@fmassa fmassa commented Jun 3, 2020

The previous implementation of pad with constant fill value had an undesired behavior when a single value was passed.

One would expect that it would fill the whole region with the (pad, pad, pad) value, but in fact it was doing (pad, 0, 0), as this is how Pillow handles it.

This is a backwards-incompatible change in torchvision that changes the behavior of the function, but given that most users use a value of 0, this shouldn't be a big issue.

@fmassa
Copy link
Member Author

fmassa commented Jun 3, 2020

@pmeier could you have a look to double-check?

Copy link
Collaborator

@pmeier pmeier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor issues but otherwise LGTM.

@fmassa fmassa merged commit 37a0d8d into pytorch:master Jun 4, 2020
@fmassa fmassa deleted the pad-bugfix branch June 4, 2020 15:47
@fmassa
Copy link
Member Author

fmassa commented Jun 4, 2020

Thanks for the review @pmeier !

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.

2 participants