From 9d78971d8bc05fd844448f01ebbc5a8a3d0112a1 Mon Sep 17 00:00:00 2001 From: zhouhanqing <1051910017@qq.com> Date: Fri, 9 Mar 2018 14:07:25 +0800 Subject: [PATCH] Some comments have been modified. --- paddle/fluid/operators/reduce_op.cc | 2 +- python/paddle/fluid/layers/nn.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/operators/reduce_op.cc b/paddle/fluid/operators/reduce_op.cc index 4266636b2..787936783 100644 --- a/paddle/fluid/operators/reduce_op.cc +++ b/paddle/fluid/operators/reduce_op.cc @@ -177,7 +177,7 @@ class ReduceProdOpMaker : public ReduceOpMaker { public: ReduceProdOpMaker(OpProto *proto, OpAttrChecker *op_checker) : ReduceOpMaker(proto, op_checker) { - SetComment("ReduceProd", "prod"); + SetComment("ReduceProd", "production"); AddComment(comment_); } }; diff --git a/python/paddle/fluid/layers/nn.py b/python/paddle/fluid/layers/nn.py index 0d9c0df85..a5957304e 100644 --- a/python/paddle/fluid/layers/nn.py +++ b/python/paddle/fluid/layers/nn.py @@ -2215,8 +2215,8 @@ def reduce_prod(input, dim=None, keep_dim=False, name=None): keep_dim (bool|False): Whether to reserve the reduced dimension in the output Tensor. The result tensor will have one fewer dimension than the :attr:`input` unless :attr:`keep_dim` is true. - name(str|None): A name for this layer(optional). If set None, the layer - will be named automatically. + name(str|None): A name for this layer(optional). If set None, the + layer will be named automatically. Returns: Variable: The reduced Tensor variable. @@ -2231,7 +2231,8 @@ def reduce_prod(input, dim=None, keep_dim=False, name=None): fluid.layers.reduce_prod(x) # [0.0002268] fluid.layers.reduce_prod(x, dim=0) # [0.02, 0.06, 0.3, 0.63] fluid.layers.reduce_prod(x, dim=-1) # [0.027, 0.0084] - fluid.layers.reduce_prod(x, dim=1, keep_dim=True) # [[0.027], [0.0084]] + fluid.layers.reduce_prod(x, dim=1, + keep_dim=True) # [[0.027], [0.0084]] """ helper = LayerHelper('reduce_prod', **locals()) out = helper.create_tmp_variable(dtype=helper.input_dtype()) -- GitLab