Skip to main content

ClikaRT::ops::dot

function

dot()

Tensor dot(Tensor a, Tensor b)

Inner product of two 1-D tensors.

ab=iaibia \cdot b = \sum_i a_i\,b_i

Higher-rank inputs are rejected; use matmul (or inner) for batched contractions.

Parameters

  • a: a 1-D tensor [K].
  • b: a 1-D tensor [K].

Returns: a 0-D scalar tensor.

Throws

  • ClikaRT::Error: (INVALID_ARGUMENT) when either operand is not 1-D or the lengths disagree.

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