Skip to content

Commit f7aff1a

Browse files
committed
add zeropad2d v0.5 codestyle
1 parent 15d9ac9 commit f7aff1a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/paddle/tensor/creation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -775,13 +775,13 @@ def meshgrid(*args, **kwargs):
775775
return out
776776

777777

778-
def zeropad2d(x, pad, data_format="NCHW", name=None):
778+
def zeropad2d(x, padding, data_format="NCHW", name=None):
779779
"""
780780
Pads the input tensor boundaries with zero according to 'pad'.
781781
782782
Args:
783783
x(Tensor): The input tensor with data type float16/float32/float64/int32/int64.
784-
pad(int | Tensor | List[int] | Tuple[int]): The padding size with data type int.
784+
padding(int | Tensor | List[int] | Tuple[int]): The padding size with data type int.
785785
The input dimension should be 4 and pad has the form (pad_left, pad_right,
786786
pad_top, pad_bottom).
787787
data_format(str): An string from: "NHWC", "NCHW". Specify the data format of
@@ -807,7 +807,7 @@ def zeropad2d(x, pad, data_format="NCHW", name=None):
807807
"""
808808

809809
return paddle.nn.functional.pad(x,
810-
pad=pad,
810+
pad=padding,
811811
mode='constant',
812812
value=0,
813813
data_format=data_format,

0 commit comments

Comments
 (0)