summaryrefslogtreecommitdiff
path: root/docs/source/nn.rst
diff options
context:
space:
mode:
authorAiling Zhang <ailzhang@fb.com>2018-07-06 15:25:30 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-07-06 15:28:11 -0700
commit227c8f2654c5aa4dda319d7401d319bb4636be47 (patch)
treefd0ed9e7957973c3105168aab0953b49e0c29d15 /docs/source/nn.rst
parent766fa1fc96e05b970b6fbd5bc121e8e04a76aaef (diff)
downloadpytorch-227c8f2654c5aa4dda319d7401d319bb4636be47.tar.gz
pytorch-227c8f2654c5aa4dda319d7401d319bb4636be47.tar.bz2
pytorch-227c8f2654c5aa4dda319d7401d319bb4636be47.zip
Implement nn.functional.interpolate based on upsample. (#8591)
Summary: This PR addresses #5823. * fix docstring: upsample doesn't support LongTensor * Enable float scale up & down sampling for linear/bilinear/trilinear modes. (following SsnL 's commit) * Enable float scale up & down sampling for nearest mode. Note that our implementation is slightly different from TF that there's actually no "align_corners" concept in this mode. * Add a new interpolate function API to replace upsample. Add deprecate warning for upsample. * Add an area mode which is essentially Adaptive_average_pooling into resize_image. * Add test cases for interpolate in test_nn.py * Add a few comments to help understand *linear interpolation code. * There is only "*cubic" mode missing in resize_images API which is pretty useful in practice. And it's labeled as hackamonth here #1552. I discussed with SsnL that we probably want to implement all new ops in ATen instead of THNN/THCUNN. Depending on the priority, I could either put it in my queue or leave it for a HAMer. * After the change, the files named as *Upsampling*.c works for both up/down sampling. I could rename the files if needed. Differential Revision: D8729635 Pulled By: ailzhang fbshipit-source-id: a98dc5e1f587fce17606b5764db695366a6bb56b
Diffstat (limited to 'docs/source/nn.rst')
-rw-r--r--docs/source/nn.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/source/nn.rst b/docs/source/nn.rst
index a83b871a32..3edc38cc0d 100644
--- a/docs/source/nn.rst
+++ b/docs/source/nn.rst
@@ -1241,6 +1241,11 @@ Vision functions
.. autofunction:: pad
+:hidden:`interpolate`
+~~~~~~~~~~~~~~~~~~~~~~~
+
+.. autofunction:: interpolate
+
:hidden:`upsample`
~~~~~~~~~~~~~~~~~~~~~~~