---
title: "ClikaRT::ops::sub_"
sidebar_label: "sub_"
description: "In-place sub: writes $ act(x - \\alpha \\cdot other) $ through x. ClikaRT::Error as the value form."
---

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

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

## sub\_() {#sub_}

<div class="api-signature">

[`Tensor`](../Tensor.md)`&` **`sub_`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md)`&` `self`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`ScalarOrTensor`](../ScalarOrTensor.md) `other`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`double` `alpha` `=` `1.0`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Activation`](./index.md#Activation) `activation` `=` [`Activation::Identity`](./index.md#Activation)<br />
)

</div>

In-place [`sub`](./sub.md#sub): writes $act(x - \alpha \cdot other)$ through `x`.

**Throws**

- `ClikaRT::Error`: as the value form.

<div class="api-declared">

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

</div>
