diff --git a/python/paddle/nn/layer/common.py b/python/paddle/nn/layer/common.py index 77fcb44437986b09489a419739f03e45e92826f7..700d558429bb5ceca7bf8866b6dfde3f436e5d0b 100644 --- a/python/paddle/nn/layer/common.py +++ b/python/paddle/nn/layer/common.py @@ -450,10 +450,11 @@ class UpsamplingNearest2D(Layer): Parameters: x (Tensor): 4-D Tensor, its data type is float32, float64, or uint8, its data format is specified by :attr:`data_format`. - size (list|tuple|Tensor|None): Output shape of image resize + size (int|list|tuple|Tensor|None): Output shape of image resize layer, the shape is (out_h, out_w) when input is a 4-D Tensor. - Default: None. If a list/tuple, each element can be an integer or a Tensor of shape: [1]. - If a Tensor , its dimensions size should be a 1. + Default: None. If an int value, the `out_h` and `out_w` will be set as the number. + If a list/tuple, each element can be an integer or a Tensor of shape: [1]. + If a Tensor, its dimensions size should be a 1. scale_factor (float|int|list|tuple|Tensor|None): The multiplier for the input height or width. At least one of :attr:`size` or :attr:`scale_factor` must be set. And :attr:`size` has a higher priority than :attr:`scale_factor`. @@ -539,9 +540,10 @@ class UpsamplingBilinear2D(Layer): Parameters: x (Tensor): 4-D Tensor, its data type is float32, float64, or uint8, its data format is specified by :attr:`data_format`. - size (list|tuple|Tensor|None): Output shape of image resize + size (int|list|tuple|Tensor|None): Output shape of image resize layer, the shape is (out_h, out_w) when input is a 4-D Tensor. - Default: None. If a list/tuple, each element can be an integer or a Tensor of shape: [1]. + Default: None. If an int value, the `out_h` and `out_w` will be set as the number. + If a list/tuple, each element can be an integer or a Tensor of shape: [1]. If a Tensor , its dimensions size should be a 1. scale_factor (float|int|list|tuple|Tensor|None): The multiplier for the input height or width. At least one of :attr:`size` or :attr:`scale_factor` must be set.