dmlc/mshadow

Row wise normalization of tensor

rayjs opened this issue · 1 comments

rayjs commented

Hi,
I am new to mshadow. I am seeking some help regarding a tensor operation. I see there are examples to implement elementwise tensor operations as below:
https://github.com/dmlc/mshadow/tree/3d87ed2a4b47ef749c616f208cee45d920fb6e6e/guide#user-defined-operator

But I am looking for slightly different that is, row wise normalization of a tensor
A= [row1; row2;... rowN]; Anormalized = [row1/norm(row1); ....; rowN/norm(rowN)];
norm refers to the 2-norm.
This can be also thought of as reduction and then broadcast along the rows of the tensor.

Is there any implementation or any pointer would be helpful?

szha commented

This code base has been donated to the Apache MXNet project per #373, and repo is deprecated. Future development and issue tracking should continue in Apache MXNet.