I’m trying to do matrix multiplication in torch. It goes like this
Operation 1
Shape of A -> 1,384
Shape of B -> 384,39000
Output shape -> 1, 39000
Shape of A -> 10,384
Shape of B -> 384,39000 --> Should be repeated 10 times as the value of 39000 x 384 should be the same while multiplying with all 10 of A
Output shape expected -> 10 x 39000
I need to repeat the “B” 10 times to get 10 x 384 x 39000 to use that to multiply with A.
How to do this?
If it’s not possible, what’s the best way to use multiprocessing to do operation 1 for all 10 instances? (10 is a random number I gave as an example, but in reality, this could go up to 100000 times). How to do this in torch?
1