Outer
torch_outer(self, vec2)
self
: (Tensor) 1-D input vectorvec2
: (Tensor) 1-D input vectorThis function does not broadcast.
Outer product of input
and vec2
. If input
is a vector of size and vec2
is a vector of size , then out
must be a matrix of size .
if (torch_is_installed()) { v1 <- torch_arange(1., 5.) v2 <- torch_arange(1., 4.) torch_outer(v1, v2) }
Useful links
Downloads (last 30 days):