Compute gradient of determinant function or inverse function

I’m not sure. According to this it’s not available:

Yet this PR looks like it might do it.

Did you try torch.inverse?