Skip to main content

ClikaRT::ops::inner

function

inner()​

Tensor inner(Tensor input, Tensor other)

Last-axis contraction of two tensors.

Sums over the LAST dim of each operand (which must agree); the output is the cartesian product of the leading shapes: [*a_lead, K] x [*b_lead, K] -> [*a_lead, *b_lead].

Parameters

  • input: left operand [.., K].
  • other: right operand [.., K].

Returns: the contracted tensor [*a_lead, *b_lead].

Throws

  • ClikaRT::Error: (INVALID_ARGUMENT) when the last dims disagree.

Declared in ClikaRT/compute/ops.h, line 2742