This is an automated email from the ASF dual-hosted git repository.
taolv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 67acbe5 [DOC] Fix many arguments in the doc: reshape_like,
arange_like, shape_array (#15752)
67acbe5 is described below
commit 67acbe5f68ccafcc1cf899ff1e7791a4555f7453
Author: Haibin Lin <[email protected]>
AuthorDate: Tue Aug 6 07:04:32 2019 -0800
[DOC] Fix many arguments in the doc: reshape_like, arange_like, shape_array
(#15752)
* Update init_op.cc
* Update elemwise_unary_op_basic.cc
---
src/operator/tensor/elemwise_unary_op_basic.cc | 6 +++---
src/operator/tensor/init_op.cc | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/operator/tensor/elemwise_unary_op_basic.cc
b/src/operator/tensor/elemwise_unary_op_basic.cc
index 6da384d..3caf840 100644
--- a/src/operator/tensor/elemwise_unary_op_basic.cc
+++ b/src/operator/tensor/elemwise_unary_op_basic.cc
@@ -546,7 +546,8 @@ Negative indices are supported, and `None` can be used for
either `lhs_end` or `
return lhs;
})
.add_argument("lhs", "NDArray-or-Symbol", "First input.")
-.add_argument("rhs", "NDArray-or-Symbol", "Second input.");
+.add_argument("rhs", "NDArray-or-Symbol", "Second input.")
+.add_arguments(ReshapeLikeParam::__FIELDS__());
void ShapeComputeCPU(const nnvm::NodeAttrs& attrs,
const OpContext& ctx,
@@ -594,8 +595,7 @@ Example::
TYPE_ASSIGN_CHECK(*out_attrs, 0, mshadow::kInt64);
return out_attrs->at(0) != -1;
})
-.add_argument("data", "NDArray-or-Symbol", "Input Array.")
-.add_arguments(ReshapeLikeParam::__FIELDS__());
+.add_argument("data", "NDArray-or-Symbol", "Input Array.");
void SizeComputeCPU(const nnvm::NodeAttrs& attrs,
const OpContext& ctx,
diff --git a/src/operator/tensor/init_op.cc b/src/operator/tensor/init_op.cc
index 0cbdaa4..239cff7 100644
--- a/src/operator/tensor/init_op.cc
+++ b/src/operator/tensor/init_op.cc
@@ -134,7 +134,8 @@ Examples::
[](const NodeAttrs& attrs) { return std::vector<uint32_t>(1, 0); })
.set_attr<FCompute>("FCompute<cpu>", RangeCompute<cpu, RangeLikeParam>)
.set_attr<nnvm::FGradient>("FGradient", MakeZeroGradNodes)
-.add_argument("data", "NDArray-or-Symbol", "The input");
+.add_argument("data", "NDArray-or-Symbol", "The input")
+.add_arguments(RangeLikeParam::__FIELDS__());
NNVM_REGISTER_OP(_linspace)
.describe("Return evenly spaced numbers over a specified interval. Similar to
Numpy")