Following up this post
When I want to use complex_det
function to calculate det of a complex matrix I face this error:
RuntimeError: isDifferentiableType(variable.scalar_type()) INTERNAL ASSERT FAILED at "/pytorch/torch/csrc/autograd/functions/utils.h":59, please report a bug to PyTorch.
any idea how I can fix it?
<ipython-input-76-246d142f8871> in complex_det(A)
3 return torch.view_as_complex(torch.stack((A.real.diag(), A.imag.diag()),dim=1))
4 #Perform LU decomposition to matrix A:
----> 5 A_LU, pivots = A.lu()
6 P, A_L, A_U = torch.lu_unpack(A_LU, pivots)
7 #Det. of multiplied matrices is multiplcation of det.:
/usr/local/lib/python3.6/dist-packages/torch/tensor.py in lu(self, pivot, get_infos)
332 r"""See :func:`torch.lu`"""
333 # If get_infos is True, then we don't need to check for errors and vice versa
--> 334 LU, pivots, infos = torch._lu_with_info(self, pivot=pivot, check_errors=(not get_infos))
335 if get_infos:
336 return LU, pivots, infos