You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to multiply a sparse matrix by a non-sparse matrix? What I'd like to do is multiply a (sparse) transition matrix in an HMM with a (non-sparse) vector of forward log probabilities.
The text was updated successfully, but these errors were encountered:
Great question. We don't have this yet, but I would like to add it. In the meantime you have two interesting options:
If you read and understand this code which implements HMMs using parallel prefix scan (also described in the paper) https://github.com/harvardnlp/pytorch-struct/blob/master/torch_struct/linearchain.py , then you will see that all the operations of sparse matrix x sparse matrix multiplies. Using this method you could have a really fast sparse HMM.
If 1 is still not fast enough, we have some unreleased code that implements HMM entirely in Cuda. If you email me we could help adapt this code for your task.
Is it possible to multiply a sparse matrix by a non-sparse matrix? What I'd like to do is multiply a (sparse) transition matrix in an HMM with a (non-sparse) vector of forward log probabilities.
The text was updated successfully, but these errors were encountered: