Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions torch/nn/modules/upsampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class Upsample(Module):
0.3.1. Since then, the default behavior is ``align_corners = False``.
See below for concrete examples on how this affects the outputs.

.. warning::
This class is deprecated in favor of :func:`~nn.functional.interpolate`.
.. note::
If you want downsampling/general resizing, you should use :func:`~nn.functional.interpolate`.

Examples::

Expand Down Expand Up @@ -121,7 +121,6 @@ def __init__(self, size=None, scale_factor=None, mode='nearest', align_corners=N
self.align_corners = align_corners

def forward(self, input):
warnings.warn("nn.Upsampling is deprecated. Use nn.functional.interpolate instead.")
return F.interpolate(input, self.size, self.scale_factor, self.mode, self.align_corners)

def extra_repr(self):
Expand Down