From e9289e8c229152feaf79889399fd3a18f57e4f30 Mon Sep 17 00:00:00 2001 From: GaoWei8 <53294385+GaoWei8@users.noreply.github.com> Date: Sun, 19 Apr 2020 17:25:10 +0800 Subject: [PATCH] enhanced lod_append, lod_reset english doc (#23803) --- python/paddle/fluid/layers/nn.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 6f6166dbdfa..55d0b091b54 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. -- GitLab