Calculate the inverse of parse matrix

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

for example

vers_n=200000
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 = torch.cat((ind_i, ind_j), dim=0)
values = torch.ones(vers_n)
I = torch.sparse.FloatTensor(indices, values, (vers_n, vers_n))
print(I.inverse())

then will get the error:

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

Hi,

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