问题描述
跟进this post
当我想使用complex_det
函数计算复数矩阵的det时,我会遇到此错误:
RuntimeError: isDifferentiableType(variable.scalar_type()) INTERNAL ASSERT Failed at "/pytorch/torch/csrc/autograd/functions/utils.h":59,please report a bug to PyTorch.
我知道该如何解决?
<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,infos
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)