eric-haibin-lin commented on a change in pull request #9625: sparse regression 
operators
URL: https://github.com/apache/incubator-mxnet/pull/9625#discussion_r170409181
 
 

 ##########
 File path: src/operator/regression_output-inl.h
 ##########
 @@ -121,6 +175,67 @@ void RegressionBackward(const nnvm::NodeAttrs& attrs,
   });
 }
 
+
+template<typename xpu, typename BackwardOp>
+inline void RegressionBackwardCSRImpl(mshadow::Stream<xpu> *s,
+                                      const RegressionOutputParam& param,
+                                      const OpReqType req,
+                                      const NDArray &data, const NDArray 
&label,
+                                      const NDArray &data_grad, const bool 
sparse_kernel) {
+  using namespace mshadow;
+  using namespace mxnet_op;
+  using namespace csr;
+  const TShape dshape = data.shape();
+  const nnvm::dim_t num_rows = dshape[0];
+  const nnvm::dim_t row_length = dshape[1];
+  CHECK_EQ(label.aux_type(kIndPtr), label.aux_type(kIdx))
+    << "Type of indices array and index pointer array of the label should be 
the same";
 
 Review comment:
   Directly return if req == null

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