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
This commit is contained in:
Soumith Chintala
2019-03-30 13:24:11 -07:00
committed by Facebook Github Bot
parent a45b79d23f
commit cb39bd9c2f

View File

@ -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