Compute the L1 norm of each row of a matrix.
Given a matrix of shape stored in row-major order, compute a vector of length such that each element is the L1 norm of the corresponding row:
Input
X— input matrix of shape stored in row-major order.n— number of rows inX.m— number of columns inX.
Output
Y— output vector of lengthn, where each elementY[i]is the L1 norm of rowiofX.