-
Notifications
You must be signed in to change notification settings - Fork 146
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
Einsum? #248
Comments
We do not have any plans to integrate |
My use case is that I wanna dot a sparse matrix |
This should be already supported in from torch_sparse import SparseTensor
sparse_mat = SparseTensor(row=row, col=col, sparse_sizes(m, n))
dense_mat = torch.randn(b, n, d)
out = sparse_mat @ dense_mat # b x m x d |
Ok I missed it. Perhaps you may want to make it more visible in the readme. Anw thanks a lot! |
If I have a tensor ten1 of shape [b,n,dim,i] which is sparse, and tne2 tensor of shape [i,m] and I want to output ten1@ten2, how can I use what you did here? |
This wouldn't be supported since sparse matrix multiplication cannot handle 4-dimensional tensors (needs to be 2 dimensions). Your best option is to reshape |
Why not? |
Likely not, |
Hey @rusty1s. Thanks for maintaining this great library. I am wondering if it is possible to support einsum for sparse matrix and tensor multiplication. Is there any difficulty? Thanks in advance!
The text was updated successfully, but these errors were encountered: