diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 6f6166dbdfa1e5675ce645b101cb36ce18994d21..55d0b091b546e324379df3a388993940c2fa607f 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -6240,10 +6240,12 @@ def lod_reset(x, y=None, target_lod=None): out.dims = [6, 1] Args: - x (Variable): Input variable which could be a Tensor or LoDTensor. - y (Variable|None): If provided, output's LoD would be derived - from :attr:`y`. - target_lod (list|tuple|None): One level LoD which should be considered + x (Variable): Input variable which could be a Tensor or LoDTensor. + The data type should be int32, int64, float32 or float64. + y (Variable, optional): If provided, output's LoD would be derived from :attr:`y`. + If y's lod level>0, the data type can be any type. + If y's lod level=0, the data type should be int32. + target_lod (list|tuple, optional): One level LoD which should be considered as target LoD when :attr:`y` not provided. Returns: @@ -6303,9 +6305,11 @@ def lod_append(x, level): x.dims = [6, 1] Args: - x (Variable): Input variable which could be a tensor or LoDTensor. - level (list|tuple|Variable): The LoD level to be appended into LoD of x. - + x (Variable): Input variable which could be a tensor or LoDTensor. + The data type should be int32, int64, float32 or float64. + level (list|tuple|Variable, optional): The LoD level to be appended into LoD of x. + If level is variable and its lod level>0, the data type can be any type. + If level is variable and its lod level=0, the data type should be int32. Returns: Variable: Output variable with new LoD level.