ENH Adds nn.ReflectionPad3d (#59791)

Summary:
Fixes https://github.com/pytorch/pytorch/issues/27655

This PR adds a C++ and Python version of ReflectionPad3d with structured kernels. The implementation uses lambdas extensively to better share code from the backward and forward pass.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/59791

Reviewed By: gchanan

Differential Revision: D29242015

Pulled By: jbschlosser

fbshipit-source-id: 18e692d3b49b74082be09f373fc95fb7891e1b56
This commit is contained in:
Thomas J. Fan
2021-06-21 10:51:49 -07:00
committed by Facebook GitHub Bot
parent f89ae9cb8d
commit c16f87949f
24 changed files with 919 additions and 11 deletions

View File

@ -37,6 +37,7 @@ torch::nn::AdaptiveAvgPool2d|Yes|No
torch::nn::AdaptiveAvgPool3d|Yes|No
torch::nn::ReflectionPad1d|Yes|No
torch::nn::ReflectionPad2d|Yes|No
torch::nn::ReflectionPad3d|Yes|No
torch::nn::ReplicationPad1d|Yes|No
torch::nn::ReplicationPad2d|Yes|No
torch::nn::ReplicationPad3d|Yes|No