Efficient way to calculate kronecker product in pytorch

Hi,

I have tensors of size [785, 785] and [301, 301]. What is the most efficient way to calculate the kronecker product for them? Whatever I used to do that resulted in kerned dying.

Thanks

If I’m understanding this correctly, the kronecker product will have size [301 * 785, 301 * 785]. Assuming you are using float tensors, the total number of bytes we need for the tensor is 785 * 785 * 301 * 301 * 4, which is roughly 208gb. Do you have that much RAM?