---
title: "ClikaRT::nn::LinearOptions"
sidebar_label: "LinearOptions"
description: "Construction options: everything beyond the two feature counts. Every field is optional / defaulted; the defaults produce a plain packing Linear."
---

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

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

**Header:** `ClikaRT/nn/linear.h`

Construction options: everything beyond the two feature counts. Every field is optional / defaulted; the defaults produce a plain packing [Linear](./Linear.md).

## Data members

### activation {#activation}

<div class="api-signature">

`std::optional<`[`ops::Activation`](../ops/index.md#Activation)`>` **`activation`**

</div>

Fused activation epilogue applied by every forward.

<div class="api-declared">

Declared in `ClikaRT/nn/linear.h`, line 138

</div>

### bias {#bias}

<div class="api-signature">

`bool` **`bias`** `= false`

</div>

Declare form only (`make(in, out, ...)`): declare a [`bias`](./LinearOptions.md#bias) slot for a later bind. The from-tensors overload reads bias presence off its own [`bias`](./LinearOptions.md#bias) argument and ignores this field.

<div class="api-declared">

Declared in `ClikaRT/nn/linear.h`, line 142

</div>

### device {#device}

<div class="api-signature">

`std::optional<`[`Device`](../Device.md)`>` **`device`**

</div>

Placement of the declared slots. Declare form: defaults to cpu. From-tensors form: defaults to the weight's own device; when set, the payloads move there at bind (the declared placement wins).

<div class="api-declared">

Declared in `ClikaRT/nn/linear.h`, line 146

</div>

### dtype {#dtype}

<div class="api-signature">

`std::optional<`[`DataType`](../../index.md#DataType)`>` **`dtype`**

</div>

PIN a dtype: the slots declare at it and every bind casts the payload to it. Unset (the default), a slot ADOPTS the bound payload's dtype (never a cast at rest) and reads [`DataType::Undefined`](../../index.md#DataType) until bound.

<div class="api-declared">

Declared in `ClikaRT/nn/linear.h`, line 150

</div>

### output\_quant {#output_quant}

<div class="api-signature">

`std::optional<`[`OutputQuant`](./OutputQuant.md)`>` **`output_quant`**

</div>

Static output quantization of the product; setting it makes the factory return a [`QLinear`](./QLinear.md) (the static-quant posture; see [qlinear.h](./QLinear.md)). It wins over the weight's own form: a quantized weight WITH output requant is precisely W8A8.

<div class="api-declared">

Declared in `ClikaRT/nn/linear.h`, line 155

</div>
