Learn R Programming

torch (version 0.0.1)

torch_ger: Ger

Description

Ger

Arguments

input

(Tensor) 1-D input vector

vec2

(Tensor) 1-D input vector

out

(Tensor, optional) optional output matrix

ger(input, vec2, out=None) -> Tensor

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

Examples

Run this code
# NOT RUN {
if (torch_is_installed()) {

v1 = torch_arange(1., 5.)
v2 = torch_arange(1., 4.)
torch_ger(v1, v2)
}
# }

Run the code above in your browser using DataLab