mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
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:
committed by
Facebook Github Bot
parent
a45b79d23f
commit
cb39bd9c2f
@ -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
|
||||
|
Reference in New Issue
Block a user