Remove deprecate warning for Upsampling#11568
Remove deprecate warning for Upsampling#11568ailzhang wants to merge 3 commits intopytorch:masterfrom
Conversation
ssnl
left a comment
There was a problem hiding this comment.
That was fast! Could you add a .. note:: to the doc and tell users if they want to resize/downsample, they should use torch.nn.functional.interpolate? (Btw, does interpolate support general resizing, i.e., to arbitrary size?)
|
@ssnl Yep it does! Actually the tricky part is, if users use nn.Upsample for downsampling, that still works. Since it calls F.interpolate inside nn.Upsample :P So they don't have to use F.interpolate despite the misleading name. |
| size (tuple, optional): a tuple of ints `(H_out, W_out)` output sizes | ||
| scale_factor (int, optional): the multiplier for the image height or width | ||
|
|
||
| .. warning:: |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
@ailzhang Okay. But we can still link to F.interpolate :) |
|
@ssnl A crazy idea: how about a generic |
facebook-github-bot
left a comment
There was a problem hiding this comment.
ailzhang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pytorchbot retest this please |
| .. warning:: | ||
| This class is deprecated in favor of :func:`~nn.functional.interpolate`. | ||
| .. note:: | ||
| If you want down sampling, you should use :func:`~nn.functional.interpolate`. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
facebook-github-bot
left a comment
There was a problem hiding this comment.
ailzhang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@pytorchbot retest this please |
|
Any updates on this ? |
|
@nehz this has already been committed. |
|
I'm still seeing it on the master and 1.0.1 branch ? |
Summary: Fixes pytorch#11452 . Based on the discussion with SsnL and soumith , we want to bring back Upsample as a module instead of introducing a new nn.interpolate module for now. If anyone want to do downsample, they should use `nn.functional.interpolate ` instead. Pull Request resolved: pytorch#11568 Differential Revision: D9804359 Pulled By: ailzhang fbshipit-source-id: 2b232d55fc83c2b581bf336f1ee8d1cf1c1159ca
Summary: IIRC we decided to remove warning in code in pytorch#11568. This got reverted accidentally in pytorch#14123. Pull Request resolved: pytorch#17921 Differential Revision: D14422811 Pulled By: ailzhang fbshipit-source-id: 7067264bd1d3e3b7861d29e18ade2969ed705ca1
Fixes #11452 .
Based on the discussion with @ssnl and @soumith , we want to bring back Upsample as a module instead of introducing a new nn.interpolate module for now. If anyone want to do downsample, they should use
nn.functional.interpolateinstead.