Is there a built in function to calculate efficiently all pairwaise dot products of two tensors in Pytorch?
e.g.

input - tensor `A`

(shape `N`

x`D`

)

tensor `B`

(shape `N`

x`D`

)

output - tensor `C`

(shape `N`

x`N`

) such that `C_i,j = torch.dot(A_i, B_j)`

?