anirudhacharya commented on a change in pull request #11209: [MXNET-536] 
implement var/std operators
URL: https://github.com/apache/incubator-mxnet/pull/11209#discussion_r217932874
 
 

 ##########
 File path: src/operator/tensor/broadcast_reduce_op_value.cc
 ##########
 @@ -324,6 +325,77 @@ NNVM_REGISTER_OP(_backward_norm)
   })
 .set_attr<FCompute>("FCompute<cpu>", L2NormGradCompute<cpu>);
 
+NNVM_REGISTER_OP(variance)
+.describe(R"code(Computes the variance on an NDArray.
+
+This operator computes the variance on an NDArray with the specified axis.
+By default, it computes the variance on the entire array.
+
+Examples::
+
+  x = [[1, 2],
+       [3, 4]]
+
+  variance(x) = [1.25]
 
 Review comment:
   can this example show the use of parameters like `axis` for this operator?

----------------------------------------------------------------
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