Hi,
thanks for your answer.
From your words, I decided to use python code only.
But there is one more problem here.
there is no way to use eigenvalue solver with the complex problem right now

  
    
    
    How to use complex eigenvalues? 
  
  
    I have a nonsymmetric real matrix that I want to calculate the eigenvalues and matrices for. I use the torch.eig() method which works. 
But my eigenvalues are complex and I am unsure of how to handle this. 
I am using the following to go from eigenvalues/vectors and back. 
X = torch.rand(20,20)
D,T = torch.eig(X, eigenvectors=True)
T.mm(torch.diag(D)).mm(T.t())

But because D consists of complex eigenvalues, and in PyTorch a complex value is a vector of two values, I am unable to calculate the o…
  


Therefore, I’m considering to use an external library.

  
      
      GitHub
  
  
    

williamFalcon/pytorch-complex-tensor

Unofficial complex tensor and scalar support for Pytorch - williamFalcon/pytorch-complex-tensor


  
  
    
    
  
  


Did you know any other way to use autograd with the complex eigenvalue problem?
If not, is it possible in tensorflow?
Best regards,
Choi