eric-haibin-lin opened a new issue #9980: [Feature Request] broadcast_mul(csr, 
   Let's say we have a MxN CSR matrix, it's quite common to normalize the CSR 
matrix `A` by a length M vector or a length N vector `B`.
   However, MXNet doesn't support broadcast_mul(csr, dense) = csr. In scipy, 
you have to do normalization with the following walk-around with a dot product:
       A = <some scipy csr metrics>
       B = np.asarray(A.sum(axis=1)).squeeze()
       row_scaling = scipy.sparse.spdiags(1/B, 0, dim, dim)
       normalized_A = row_scaling * A
   What we can do in MXNet is to directly support broadcast_mul(csr, dense) = 
csr. Note that an efficient implementation only looks up non-zeros in the csr 
matrix and find the corresponding element in the dense right-hand-side. This 
means that if the dense matrix has any `Nan` element, we are ignoring it during 
the computation (we are already doing this in ``). 
   For a complete implementation, both 1-D and 2-D dense ndarray as rhs should 
be implemented. 

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:

With regards,
Apache Git Services

Reply via email to