Return the sum of each row of the given sparse tensor.
Returns the sum of each row of the sparse tensor input in the given
dimensions dim. If is a list of dimensions,
reduce over all of them. When sum over all , this method
returns a dense tensor instead of a sparse tensor.
dim
sparse_dim
All summed dim are squeezed (see torch.squeeze()), resulting an output
tensor having dim fewer dimensions than input.
During backward, only gradients at nnz locations of input
will propagate back. Note that the gradients of input is coalesced.