recpack.algorithms.util.naive_sparse2tensor
- recpack.algorithms.util.naive_sparse2tensor(data: scipy.sparse._csr.csr_matrix) torch.Tensor
Naively converts sparse csr_matrix to torch Tensor.
- Parameters
data (csr_matrix) – CSR matrix to convert
- Returns
Torch Tensor representation of the matrix.
- Return type
torch.Tensor