-
Notifications
You must be signed in to change notification settings - Fork 30
Allow user to dynamically set batch size of pixel SOM assignments #1069
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
Conversation
…orts, and also that users can change if necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review! Just some small requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add the same functionality to assign_som_clusters
in the CellSOMCluster
class in cluster_helpers.py (and cell_som_clustering.py respectively)?
Sure, same batch size work? |
Yup, that works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
What is the purpose of this PR?
The current hard-coded batch size of 100 makes pixel SOM cluster assignment extremely slow. For a powerful machine (and even modern-day M1's and M2's), it can handle a much larger batch size and offer a 100x+ speedup.
How did you implement your changes
Pass an argument through the PixelSOMCluster process called
num_parallel_pixels
, which controls how many SOM clusters get assigned at once.