Skip to main content

ClikaRT::nn::LinearOptions

struct

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.

Data members​

activation​

std::optional<ops::Activation> activation

Fused activation epilogue applied by every forward.

Declared in ClikaRT/nn/linear.h, line 136

bias​

bool bias = false

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

Declared in ClikaRT/nn/linear.h, line 140

device​

std::optional<Device> device

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).

Declared in ClikaRT/nn/linear.h, line 144

dtype​

std::optional<DataType> dtype

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 until bound.

Declared in ClikaRT/nn/linear.h, line 148

output_quant​

std::optional<OutputQuant> output_quant

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

Declared in ClikaRT/nn/linear.h, line 153