Skip to main content

ClikaRT::ops::dot

function

dot()​

Tensor dot(Tensor input, Tensor other)

Inner product of two 1-D tensors.

a⋅b=∑iai bia \cdot b = \sum_i a_i\,b_i

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

Parameters

  • input: a 1-D tensor [K].
  • other: 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 2709