From cb39bd9c2f733e81fcd54bc1d00bf7342698e432 Mon Sep 17 00:00:00 2001 From: Soumith Chintala Date: Sat, 30 Mar 2019 13:24:11 -0700 Subject: [PATCH] pad_circular -> _pad_circular (#18608) Summary: pad_circular is really private, as circular padding is exposed via `F.pad` Pull Request resolved: https://github.com/pytorch/pytorch/pull/18608 Differential Revision: D14691704 Pulled By: soumith fbshipit-source-id: 8c2f90596feed670976115041efed3ca071e8306 --- torch/nn/functional.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/torch/nn/functional.py b/torch/nn/functional.py index a286c22..f3d707a 100644 --- a/torch/nn/functional.py +++ b/torch/nn/functional.py @@ -2771,7 +2771,7 @@ def pad(input, pad, mode='constant', value=0): elif mode == 'replicate': ret = torch._C._nn.replication_pad1d(input, pad) elif mode == 'circular': - ret = pad_circular(input, pad) + ret = _pad_circular(input, pad) else: ret = input # TODO: remove this when jit raise supports control flow raise NotImplementedError @@ -2783,7 +2783,7 @@ def pad(input, pad, mode='constant', value=0): elif mode == 'replicate': ret = torch._C._nn.replication_pad2d(input, pad) elif mode == 'circular': - ret = pad_circular(input, pad) + ret = _pad_circular(input, pad) else: ret = input # TODO: remove this when jit raise supports control flow raise NotImplementedError @@ -2796,7 +2796,7 @@ def pad(input, pad, mode='constant', value=0): elif mode == 'replicate': ret = torch._C._nn.replication_pad3d(input, pad) elif mode == 'circular': - ret = pad_circular(input, pad) + ret = _pad_circular(input, pad) else: ret = input # TODO: remove this when jit raise supports control flow raise NotImplementedError @@ -3030,7 +3030,7 @@ def fold(input, output_size, kernel_size, dilation=1, padding=0, stride=1): @weak_script -def pad_circular(input, padding): +def _pad_circular(input, padding): # type: (Tensor, List[int]) -> Tensor """ Arguments -- 2.7.4