Closed paoloart closed 2 weeks ago
Any suggestions?
Oops. I didn't create probs
on the same device as the object, just on the CPU. https://github.com/jmschrei/pomegranate/blob/master/pomegranate/distributions/categorical.py#L185
This should be fixed in v1.1.1, which you can get from pip now. Sorry for the delay. Please re-open if issues persist.
I have a dataset consisting in a sequence of symbols indicating the neuron that discharge in each bin of a given trial. I'm trying to perform an HMM analysis in order to evaluate which hidden states characterize each time bin of each trial. When trying to perform the analysis on CPU using your package, it all works fine, but when I tried to perform it on GPU in returns the following error:
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu this error seems strange because - i think - all the things are loaded on GPU. See the code example below.
I followed your guide to set up the script, which I will share below, and I think that all tensors that I give the model are actually on GPU, differently from what the above mentioned error suggests. I have installed torch 2.4.0 and cuda toolkit build "cuda_11.8.r11.8/compiler.31833905_0"
Below is a simplified example of the script I'm using, in which I put an example of all the input I'm giving to the model :
The "X" dataset that I'm using instead is built like this: [[0] [0] [0] ... [6] [0] [0]]
with shape (21908, 1)
What would be the problem here? Is it possible that the error is linked to the fact that I'm using "Categorical" to build the distributions?