torch_outer function

Outer

Outer

torch_outer(self, vec2)

Arguments

  • self: (Tensor) 1-D input vector
  • vec2: (Tensor) 1-D input vector

Note

This function does not broadcast.

outer(input, vec2, *, out=None) -> Tensor

Outer product of input and vec2. If input is a vector of size nn and vec2 is a vector of size mm, then out must be a matrix of size (n×m)(n \times m).

Examples

if (torch_is_installed()) { v1 <- torch_arange(1., 5.) v2 <- torch_arange(1., 4.) torch_outer(v1, v2) }
  • Maintainer: Daniel Falbel
  • License: MIT + file LICENSE
  • Last published: 2025-02-14

Downloads (last 30 days):