---
title: "ClikaRT::ops::inner"
sidebar_label: "inner"
description: "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_…"
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## inner() {#inner}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`inner`**([`Tensor`](../Tensor.md) `input`, [`Tensor`](../Tensor.md) `other`)

</div>

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.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 2809

</div>
