et, vt = torch.eig(X, eigenvectors=True)

I am using torch.eig and getting the following error.

TypeError: Type Variable doesn’t implement stateless method eig

How can I solve the problem?

et, vt = torch.eig(X, eigenvectors=True)

I am using torch.eig and getting the following error.

TypeError: Type Variable doesn’t implement stateless method eig

How can I solve the problem?

If you do not need the backprop, maybe you can use `et,vt = torch.eig(X.data, eigenvectors=True)`

Otherwise, you need to write the eig manually.

1 Like

Thank you so much for your reply. I need back propagation. Is there any function in pytorch so that I can get eigenvector from an input (with back propagation) ?

Maybe you could check the `eig`

implementation in the Torch7 .

A new paper about Auto-differentiating linear algebra was published just a few days ago. As i skimmed it, there seems to be an implementation of `symmetric eigen`

, which could be useful for your approach.

I think it won’t take long until someone starts to implement it for PyTorch.