Easy way to compute outer products?
yoonholee
Cysu
Perfect, just what i needed. Thanks!
yoonholee
Is there a way to do this in batch mode? So if I have two batches of vectors, is there an easy way to compute the (batch) outer products?
vitchyr
<SCODE>b = u.size(0)
m = u.size(1)
n = v.size(1)
u.unsqueeze(2).expand(b,m,n)*v.unsqueeze(1).expand(b,m,n)
<ECODE> Best regards Thomas
tom
Avinab_Saha
Best regards Thomas
tom
Hope this helps!
Rahul_Soni