taliesinb commented on a change in pull request #12064: Allow stop of arange to 
be inferred from dims.
URL: https://github.com/apache/incubator-mxnet/pull/12064#discussion_r209592905
 
 

 ##########
 File path: src/operator/tensor/init_op.h
 ##########
 @@ -471,6 +473,11 @@ inline bool RangeShape(const nnvm::NodeAttrs& attrs,
     << "Range does not support step=0, received " << param.step;
   CHECK(param.repeat > 0)
     << "Range only supports repeat > 0, received " << param.repeat;
+  if (param.start == param.stop.value()) {
 
 Review comment:
   if that is not desired, here's a simple proposal: introduce a new parameter 
called "infer_range" that defaults to false. if it is true, then exactly one of 
`param.stop`, `param.start`, or `param.step` can be None, and will be inferred 
from the others and the output dimensions. I may only implement something more 
limited that makes `param.stop` be the only inferrable parameter, and leave 
that to others to implement in the future.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to