tfep.utils.math.batchwise_outer
- tfep.utils.math.batchwise_outer(x1, x2)[source]
Batchwise outer product.
- Parameters:
x1 (torch.Tensor) – A tensor of shape
(*, N).x2 (torch.Tensor) – A tensor of shape
(*, N).
- Returns:
result – A tensor shape
(*, N, N), whereresult[..., i, j]is the outer product betweenx1[..., i]andx2[..., j].- Return type:
torch.Tensor