Eden-Kramer-Lab / replay_trajectory_classification

State space models for decoding hippocampal trajectories and determining their type using sorted or clusterless data
MIT License
44 stars 14 forks source link

Tutorial for using GPU functions #13

Open edeno opened 2 years ago

chris-angeloni commented 1 week ago

Hi, curious about the timeline for this? Clusterless decoding is taking a while for me (1 hour + for 50s recording snippets). I passeduse_gpu=True for predict, but it doesn't seem to have an effect. Do I need to specify a gpu-based encoding model for this to work as expected?

edit: wow, this was the answer... went from 1+ hour to finishing in 5 seconds once I set the algorithm to 'multiunit_likelihood_gpu'

edeno commented 1 week ago

Ah glad you found it. Generally making sure cupy is installed, set use_gpu=True in the predict function will speed up the state space part of the model and you can also set the likelihood algorithm to use gpu (e.g. sorted_spikes_algorithm = "spiking_likelihood_kde_gpu"