src.utils.sparse.torch2ssp

src.utils.sparse.torch2ssp(M)[source]

Convert torch sparse matrix to scipy.sparse matrix. Since scipy.sparse has a dimension limit of 2, batches are represented in list in the output. :param M: input torch sparse matrix :return: output scipy.sparse matrix