Calculate the inverse of parse matrix

I want to calculate the inverse of a sparse matrix, how can I do this ?

for example

ind_i = torch.Tensor(list(range(vers_n))).long().view(1,-1)
ind_j = torch.Tensor(list(range(vers_n))).long().view(1,-1)
indices =, ind_j), dim=0)
values = torch.ones(vers_n)
I = torch.sparse.FloatTensor(indices, values, (vers_n, vers_n))

then will get the error:

RuntimeError: Could not run 'aten::_inverse_helper' with arguments from the 'SparseCPUTensorId' backend. 'aten::_inverse_helper' is only availabl


I am afraid we don’t have this implemented in pytorch yet.
You will have to make a dense Tensor before being able to use the inverse() function.
You can open a new issue on github to ask for this feature though if it would be useful for your research!

Okay ! Thanks, I will turn to the github for a new issue