pengxin99 commented on a change in pull request #15400: Add a new arange_like 
operator to contrib
URL: https://github.com/apache/incubator-mxnet/pull/15400#discussion_r298585843
 
 

 ##########
 File path: src/operator/tensor/init_op.h
 ##########
 @@ -174,6 +174,40 @@ struct RangeParam : public dmlc::Parameter<RangeParam> {
   }
 };
 
+struct RangeLikeParam : public dmlc::Parameter<RangeLikeParam> {
+  double start;
+  double step;
+  int repeat;
+  std::string ctx;
+  int dtype;
+  dmlc::optional<int> axis;
+
+  DMLC_DECLARE_PARAMETER(RangeLikeParam) {
+    DMLC_DECLARE_FIELD(start)
+    .set_default(0)
+    .describe("Start of interval. The interval includes this value. The 
default start value is 0.");
+    DMLC_DECLARE_FIELD(step)
+    .set_default(1)
+    .describe("Spacing between values.");
+    DMLC_DECLARE_FIELD(repeat)
+    .set_default(1)
+    .describe("The repeating time of all elements."
+              " E.g repeat=3, the element a will be repeated three times --> 
a, a, a.");
 
 Review comment:
   want to know how the `repeat` parameter work with:
   
https://github.com/apache/incubator-mxnet/blob/35db8e5a4719335a8974f2a8198a44e814fedaa0/src/operator/tensor/init_op.h#L494-L499
    and there is not repeat parameter on the `numpy.arange()`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to