fn
ger
→Tensorger(vec1: Tensor, vec2: Tensor)Outer product of two 1-D tensors.
Forwards to lucid.linalg.outer. Provided under the legacy BLAS
name (ger = "general rank-one update") for API parity.
Parameters
vec1Tensor1-D tensor of length
M.vec2Tensor1-D tensor of length
N.Returns
Tensor2-D tensor of shape (M, N) holding the outer product.
Notes
Mathematical definition:
The result is always rank-1 (in the linear-algebra sense). Use
addr to perform a rank-1 update in place of an accumulator.
Examples
>>> import lucid
>>> u = lucid.tensor([1., 2., 3.])
>>> v = lucid.tensor([4., 5.])
>>> lucid.ger(u, v)
Tensor([[ 4., 5.],
[ 8., 10.],
[12., 15.]])