torch.Tensor.to_sparse_bsr
Tensor.to_sparse_bsr(blocksize, dense_dim) -> Tensor
Convert a tensor to a block sparse row (BSR) storage format of
   given blocksize.  If the "self" is strided, then the number of
   dense dimensions could be specified, and a hybrid BSR tensor will
   be created, with dense_dim dense dimensions and self.dim() - 2 -
   dense_dim batch dimension.
Parameters:
      * blocksize (list, tuple, "torch.Size", optional) -- Block
        size of the resulting BSR tensor. A block size must be a tuple
        of length two such that its items evenly divide the two sparse
        dimensions.
  * **dense_dim** (*int**, **optional*) -- Number of dense
    dimensions of the resulting BSR tensor.  This argument should
    be used only if "self" is a strided tensor, and must be a
    value between 0 and dimension of "self" tensor minus two.

Example:
  >>> dense = torch.randn(10, 10)
  >>> sparse = dense.to_sparse_csr()
