Skip to main content

ClikaRT::ops::linear

function

linear()

Tensor linear(
    Tensor x,
    Tensor weight,
    OptionalTensor bias = {},
    std::optional<Activation> activation = std::nullopt,
    double situ_beta = 0.0,
    double situ_linear_beta = 0.0
)

x @ weightᵀ (+ bias); weight in the [out, in] Linear layout. Same situ contract as matmul: Activation::Situ transforms both halves of the gate‖up projection under the two soft-caps (situ_beta = β, situ_linear_beta = lβ, both > 0, from the model's config); either scalar with any other activation rejects.

Declared in ClikaRT/compute/ops.h, line 2800