torch.sparse.sum
torch.sparse.sum(input, dim=None, dtype=None)
Returns the sum of each row of the sparse tensor "input" in the
   given dimensions "dim". If "dim" is a list of dimensions, reduce
   over all of them. When sum over all "sparse_dim", this method
   returns a dense tensor instead of a sparse tensor.
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.
Parameters:
      * input (Tensor) -- the input sparse tensor
  * **dim** (*int** or **tuple of ints*) -- a dimension or a list
    of dimensions to reduce. Default: reduce over all dims.

  * **dtype** ("torch.dtype", optional) -- the desired data type
    of returned Tensor. Default: dtype of "input".

Return type:
      Tensor
Example:
  >>> nnz = 3
