Skip to content

Conversation

@ailzhang
Copy link
Contributor

fix #21044

Bicubic interpolation can cause overshoot.

Opencv keeps results dtype aligned with input dtype:

  • If input is uint8, the result is clamped [0, 255]
  • If input is float, the result is unclamped.

In Pytorch case, we only accept float input, so we'll keep the result unclamped, and add some notes so that users can explicitly call torch.clamp() when necessary.

@pytorchbot pytorchbot added the module: nn Related to torch.nn label Jul 24, 2019
@ailzhang ailzhang requested a review from soumith July 24, 2019 19:10
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@ailzhang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@ailzhang
Copy link
Contributor Author

xla failure is non related - this branch is based on an old master.

@ailzhang ailzhang requested a review from fmassa July 24, 2019 19:44
@facebook-github-bot
Copy link
Contributor

@ailzhang merged this pull request in b7d9033.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: nn Related to torch.nn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visual noise being introduced by Bicubic interpolation

5 participants