Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why this is infinite loop? #98

Open
soohyoen opened this issue Jul 30, 2024 · 2 comments
Open

Why this is infinite loop? #98

soohyoen opened this issue Jul 30, 2024 · 2 comments

Comments

@soohyoen
Copy link

soohyoen commented Jul 30, 2024

I encounters infinite loop when i run a saga_gui.py

First, the torch version caused the following error in def pca.

TypeError: linalg_eig() got an unexpected keyword argument 'eigenvectors'

So I changed it to the code below and the gui screen doesn't pop up when I run it and it's stuck in loading model file done.

`

def pca(self, X, n_components=3):

  n = X.shape[0]
  mean = torch.mean(X, dim=0)
  X = X - mean
  covariance_matrix = (1/n) * torch.matmul(X.T, X).float()

  eigenvalues, eigenvectors = torch.linalg.eig(covariance_matrix)

  # Convert complex eigenvalues and eigenvectors to real parts
  eigenvalues = eigenvalues.real
  eigenvectors = eigenvectors.real

  # Sort eigenvectors based on eigenvalues in descending order
  idx = torch.argsort(-eigenvalues)
  eigenvectors = eigenvectors[:, idx]

  proj_mat = eigenvectors[:, :n_components]
  return proj_mat

`

Why is this like that?

@soohyoen
Copy link
Author

I think this problem doesn't get gui screen using ssh server.

How can we fix the problem?

@Jumpat
Copy link
Owner

Jumpat commented Aug 5, 2024

Hi. Sorry for the late response. But the SAGA gui currently cannot support remote server (at least I failed). You may need x11 forwarding for this but I'm not sure whether it can work. You can use the notebook provided by us as a replacement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants