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

get_kmeans_mu - nan value in cost variable #36

Open
eugenioborrini opened this issue Dec 1, 2023 · 0 comments
Open

get_kmeans_mu - nan value in cost variable #36

eugenioborrini opened this issue Dec 1, 2023 · 0 comments

Comments

@eugenioborrini
Copy link

When the n_center variable has a high value, some patterns may not belonging to any of the n_center cluser,.
In this case the code
for c in range(n_centers): cost += torch.norm(x[l2_cls == c] - tmp_center[c], p=2, dim=1).mean()
could generate nan as result

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