pytorch_sparse icon indicating copy to clipboard operation
pytorch_sparse copied to clipboard

Sparse Bilinear map

Open Xparx opened this issue 1 year ago • 4 comments

Hey,

I'm trying to implement a custom attention mechanism. Is there a function or a efficient way to implement a bilinear mapping in pytorch_sparse?

Xparx avatar Mar 25 '24 22:03 Xparx

Can you clarify what you wan to do exactly?

rusty1s avatar Mar 26 '24 07:03 rusty1s

I wanted to try to do the same as in the pytorch bilinear module, when A is a sparse matrix.

Xparx avatar Mar 26 '24 16:03 Xparx

As far as I understand pytorch_sparse works on 2d tensors so might not be relevant exactly. I might need to think this one over a bit.

Xparx avatar Mar 26 '24 17:03 Xparx

torch-sparse can handle more than 2 dimensions (but only the first two can be sparse). Would that be sufficient in your case?

rusty1s avatar Mar 27 '24 12:03 rusty1s

Hey, Sorry for the slow response. I think my problem and my understanding of what is being computed doesn't make sense. I manage to use torch-sparse for the sparse computations I needed. I'm going to close this issue for now.

Thanks for the great library!

Xparx avatar Jun 06 '24 21:06 Xparx