Skip to content

Fixed errors due to old torch.eig function being removed + refactoring and add iris dataset#6

Open
qmeeus wants to merge 2 commits intomxl1990:masterfrom
qmeeus:master
Open

Fixed errors due to old torch.eig function being removed + refactoring and add iris dataset#6
qmeeus wants to merge 2 commits intomxl1990:masterfrom
qmeeus:master

Conversation

@qmeeus
Copy link
Copy Markdown

@qmeeus qmeeus commented Mar 29, 2023

No description provided.

Comment thread tsne_torch.py
H = torch.log(sumP) + beta * torch.sum(D * P) / sumP
P = P / sumP

P = (-D).exp() * beta
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix breaking change

Suggested change
P = (-D).exp() * beta
P = (-D * beta).exp()

Comment thread tsne_torch.py


def x2p_torch(X, tol=1e-5, perplexity=30.0):
def x2p_torch(X:torch.FloatTensor, tol=1e-5, perplexity=30.0, verbose=False):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def x2p_torch(X:torch.FloatTensor, tol=1e-5, perplexity=30.0, verbose=False):
def x2p_torch(X: torch.FloatTensor, tol=1e-5, perplexity=30.0, verbose=False):

Comment thread tsne_torch.py


def tsne(X, no_dims=2, initial_dims=50, perplexity=30.0):
def pca_torch(X, k=50, device="cuda"):
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def pca_torch(X, k=50, device="cuda"):
def pca_torch(X, k=50):

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

Successfully merging this pull request may close these issues.

2 participants