---
title: "ClikaRT::nn::Add"
sidebar_label: "Add"
description: "Adds other, scaled by alpha, to input elementwise with broadcasting: input + alpha * other, then the optional fused activation."
---

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

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

**Header:** `ClikaRT/nn/generated/elementwise.h`  
**Inherits:** [`ClikaRT::nn::Module`](./Module.md)

Adds `other`, scaled by alpha, to `input` elementwise with broadcasting: input + alpha \* other, then the optional fused activation. The module form of [`ClikaRT::ops::add`](../ops/add.md#add), which documents the full contract (shapes, dtypes, errors); construct once, then call it like a function.

## Member functions

### Add() {#Add}

<div class="api-signature">

`explicit` **`Add`**([`AddOptions`](./AddOptions.md) `options` `=` `{}`)

</div>

Constructs the module from [`options`](./Add.md#options) (every default when omitted).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/elementwise.h`, line 60

</div>

### forward() {#forward}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`forward`**([`Tensor`](../Tensor.md) `input`, [`ScalarOrTensor`](../ScalarOrTensor.md) `other`) `const`

</div>

[`forward_impl`](./Add.md#forward), unwrapped: raises [`ClikaRT::Error`](../Error.md) on failure.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/elementwise.h`, line 74

</div>

### operator()() {#operator-call}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`operator()`**([`Tensor`](../Tensor.md) `input`, [`ScalarOrTensor`](../ScalarOrTensor.md) `other`) `const`

</div>

Same as [`forward`](./Add.md#forward).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/elementwise.h`, line 78

</div>

### options() {#options}

<div class="api-signature">

`const` [`AddOptions`](./AddOptions.md)`&` **`options`**() `const`

</div>

The settings this module was constructed with.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/elementwise.h`, line 82

</div>
