enhanced lod_append, lod_reset english doc (#23803)

revert-22778-infer_var_type
GaoWei8 5 years ago committed by GitHub
parent 45e48c3c32
commit e9289e8c22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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.

Loading…
Cancel
Save