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

Return values are forced to be on CPU #27

Open
maria-korosteleva opened this issue Jun 22, 2021 · 1 comment
Open

Return values are forced to be on CPU #27

maria-korosteleva opened this issue Jun 22, 2021 · 1 comment

Comments

@maria-korosteleva
Copy link

Hi!
Thanks for the great tool!

I noticed that the output of kmeans() is forced to be on the CPU regardless of what device was requested. Line 121 here

return choice_cluster.cpu(), initial_state.cpu()

I'd expect the return values to be on the same device as the device requested in the function call.

Is there a particular reason for forcing the cpu in returned values?

@subhadarship
Copy link
Owner

Thanks for the Q! There is no necessary reason to force the output to be on the CPU. I just did it because it fit my use case. Feel free to change that code to fit your use case (or even contribute by making a pull request!)

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