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

Does not work with 2D, 3D features #18

Open
morawi opened this issue Feb 9, 2021 · 1 comment
Open

Does not work with 2D, 3D features #18

morawi opened this issue Feb 9, 2021 · 1 comment

Comments

@morawi
Copy link

morawi commented Feb 9, 2021

How to set the num_features?

@morawi
Copy link
Author

morawi commented Feb 10, 2021

I gave the code a go, since I was iterating over K=1,..., n; seems that K=1 was the source of the problem.
Although there might not be sense of using K=1, we can prevent the error using:

Line 57 
dimens = 0 if num_clusters==1 else 1
choice_cluster = torch.argmin(dis, dim=dimens)   # choice_cluster = torch.argmin(dis, dim=1) 

dim=dimens should replace all dim=1 instances

Or, adding throw error message whenever num_clusters <2

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

1 participant