How to calculate determinant with pytorch

I want to calculate the determinant of a variable and if fact I want to get the gradient of the det w.r.t. each elements in the matrix.

You could compute the determinant by computing the product of all its eigenvalues, but I don’t there there are yet backprop for torch.eig