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

Input own similarity matrix? #21

Open
ameya98 opened this issue Nov 13, 2019 · 1 comment
Open

Input own similarity matrix? #21

ameya98 opened this issue Nov 13, 2019 · 1 comment

Comments

@ameya98
Copy link

ameya98 commented Nov 13, 2019

Thanks for the implementation. We have a similarity matrix W, and we were wondering if we could use SpectralNet to learn embeddings (in the spectral basis of the associated Laplacian of the similarity matrix).
It seems that W is being learned as part of the optimization procedure in SpectralNet, but we want to shortcircuit that.

@lihenryhfl
Copy link
Collaborator

Hi, you can actually create your own n x n affinity matrix as a function of the n inputs to the affinity matrix per batch. See

# create affinity matrix

The easiest reference function you can look at is full_affinity(X, scale), which is used in the first part of the conditional in the referenced part of the python script.

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