---
title: "ClikaRT::nn::SmoothL1LossOptions"
sidebar_label: "SmoothL1LossOptions"
description: "Settings of SmoothL1Loss: chain the setters, or assign the fields."
---

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

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

**Header:** `ClikaRT/nn/generated/loss.h`

Settings of [`SmoothL1Loss`](./SmoothL1Loss.md): chain the setters, or assign the fields.

## Member functions

### reduction(ops::Reduction) {#reduction}

<div class="api-signature">

[`SmoothL1LossOptions`](./SmoothL1LossOptions.md)`&` **`reduction`**([`ops::Reduction`](../ops/index.md#Reduction) `v`)

</div>

Sets [`reduction`](./SmoothL1LossOptions.md#reduction), how the elementwise losses reduce.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/loss.h`, line 130

</div>

### reduction() {#reduction-2}

<div class="api-signature">

[`ops::Reduction`](../ops/index.md#Reduction) **`reduction`**() `const`

</div>

Reads [`reduction`](./SmoothL1LossOptions.md#reduction).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/loss.h`, line 132

</div>

### beta(double) {#beta}

<div class="api-signature">

[`SmoothL1LossOptions`](./SmoothL1LossOptions.md)`&` **`beta`**(`double` `v`)

</div>

Sets [`beta`](./SmoothL1LossOptions.md#beta), the switch point between the quadratic and the linear regime.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/loss.h`, line 138

</div>

### beta() {#beta-2}

<div class="api-signature">

`double` **`beta`**() `const`

</div>

Reads [`beta`](./SmoothL1LossOptions.md#beta).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/loss.h`, line 140

</div>

## Data members

### reduction\_ {#reduction_}

<div class="api-signature">

[`ops::Reduction`](../ops/index.md#Reduction) **`reduction_`** `=` [`ops::Reduction::Mean`](../ops/index.md#Reduction)

</div>

How the elementwise losses reduce. Default [`ops::Reduction::Mean`](../ops/index.md#Reduction).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/loss.h`, line 134

</div>

### beta\_ {#beta_}

<div class="api-signature">

`double` **`beta_`** `= 1.0`

</div>

The switch point between the quadratic and the linear regime. Default `1.0`.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/loss.h`, line 143

</div>
