diff --git a/paddle/fluid/API.spec b/paddle/fluid/API.spec index 63b15777cf2da0c3010defdde3763be616e0913d..de6e39104cb0327a65e5f2c18ee5e8b0a4b5b320 100644 --- a/paddle/fluid/API.spec +++ b/paddle/fluid/API.spec @@ -379,7 +379,7 @@ paddle.fluid.layers.StaticRNN.step (ArgSpec(args=['self'], varargs=None, keyword paddle.fluid.layers.StaticRNN.step_input (ArgSpec(args=['self', 'x'], varargs=None, keywords=None, defaults=None), ('document', '5b71df1f6beee225ccfa9566f537059d')) paddle.fluid.layers.StaticRNN.step_output (ArgSpec(args=['self', 'o'], varargs=None, keywords=None, defaults=None), ('document', '10a543d40e14408765c5294636646a6c')) paddle.fluid.layers.StaticRNN.update_memory (ArgSpec(args=['self', 'mem', 'var'], varargs=None, keywords=None, defaults=None), ('document', '2021b2399d9a2265e2c254973ed151cd')) -paddle.fluid.layers.reorder_lod_tensor_by_rank (ArgSpec(args=['x', 'rank_table'], varargs=None, keywords=None, defaults=None), ('document', '5b552a1f0f7eb4dacb768a975ba15d08')) +paddle.fluid.layers.reorder_lod_tensor_by_rank (ArgSpec(args=['x', 'rank_table'], varargs=None, keywords=None, defaults=None), ('document', 'db67cfcdd20ff6380d125a7553d62121')) paddle.fluid.layers.Print (ArgSpec(args=['input', 'first_n', 'message', 'summarize', 'print_tensor_name', 'print_tensor_type', 'print_tensor_shape', 'print_tensor_lod', 'print_phase'], varargs=None, keywords=None, defaults=(-1, None, 20, True, True, True, True, 'both')), ('document', '3130bed32922b9fd84ce2dea6250f635')) paddle.fluid.layers.is_empty (ArgSpec(args=['x', 'cond'], varargs=None, keywords=None, defaults=(None,)), ('document', '3011dc695f490afdf504dc24f628319a')) paddle.fluid.layers.sigmoid (ArgSpec(args=['x', 'name'], varargs=None, keywords=None, defaults=(None,)), ('document', '7bd26680989f33301a4a68000d5af4b0')) diff --git a/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc b/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc index 7ceb5b58465bcdfa22345944bf8140793f187498..d414eff879940b02957b988256f00b20c8d32050 100644 --- a/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc +++ b/paddle/fluid/operators/reorder_lod_tensor_by_rank_op.cc @@ -30,7 +30,7 @@ class ReorderLoDTensorByRankTableOpProtoMaker AddInput("RankTable", "(LoDRankTable), the rank table according to which Input(X) is " "reordered."); - AddOutput("Out", "(LoDTensor), the reordered lod tensor."); + AddOutput("Out", "LoDTensor, the reordered lod tensor."); AddComment(R"DOC(ReorderLoDTensorByRankTable operator. Input(X) is a batch of sequences. Input(RankTable) stores new orders of the @@ -57,7 +57,8 @@ X = [Slice0, Slice1, Slice2, Slice3] and its LoD information is empty. The indices in RankTable are [3, 0, 2, 1]. Out = [Slice3, Slice0, Slice2, Slice1] with no LoD information is appended. -NOTE: This operator sorts Input(X) according to a given LoDRankTable which does +**NOTE**: +This operator sorts Input(X) according to a given LoDRankTable which does not need to be calculated according to Input(X). It can be calculated according to another different sequence, and then this operator sorts Input(X) according to the given LoDRankTable. diff --git a/python/paddle/fluid/layers/control_flow.py b/python/paddle/fluid/layers/control_flow.py index dfc15384026288ce81c54d9194d8b23cb33806f4..09c03f84520324685c0915e82757d9e64c1cf87a 100644 --- a/python/paddle/fluid/layers/control_flow.py +++ b/python/paddle/fluid/layers/control_flow.py @@ -2337,12 +2337,11 @@ def reorder_lod_tensor_by_rank(x, rank_table): ${comment} Args: - - x(${x_type}): ${x_comment} - rank_table(${rank_table_type}): ${rank_table_type} + x(${x_type}): ${x_comment}. + rank_table(${rank_table_type}): ${rank_table_comment}. Returns: - out(${out_type}): ${out_comment} + out(${out_type}): ${out_comment}. Examples: .. code-block:: python