anirudh2290 commented on a change in pull request #12749: [MXNET-1029] Feature 
request: randint operator
URL: https://github.com/apache/incubator-mxnet/pull/12749#discussion_r236474557
 
 

 ##########
 File path: src/operator/random/sample_op.h
 ##########
 @@ -249,6 +254,30 @@ struct SampleGenNegBinomialParam : public 
dmlc::Parameter<SampleGenNegBinomialPa
   }
 };
 
+struct SampleRandIntParam : public dmlc::Parameter<SampleRandIntParam>,
+  RandIntParam, SampleOpParam {
+  DMLC_DECLARE_PARAMETER(SampleRandIntParam) {
+    DMLC_DECLARE_FIELD(low)
+    .describe("Lower bound of the distribution.");
+    DMLC_DECLARE_FIELD(high)
+    .describe("Upper bound of the distribution.");
+    DMLC_DECLARE_FIELD(shape)
+    .set_default(TShape())
+    .describe("Shape of the output.");
+    DMLC_DECLARE_FIELD(ctx)
+    .set_default("")
+    .describe("Context of output, in format [cpu|gpu|cpu_pinned](n)."
+              " Only used for imperative calls.");
+    DMLC_DECLARE_FIELD(dtype)
+    .add_enum("None", -1)
+    .add_enum("int32", kInt32)
+    .add_enum("int64", kInt64)
+    .set_default(-1)
 
 Review comment:
   ignore this, setting default here may cause issues if out type is set. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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