Skip to main content

//clika-runtime/io.clika.runtime/Ops/linear

linear

[common]
fun linear(input: Tensor, weight: Tensor, bias: Tensor? = null, activation: Activation? = null, situBeta: Double = 0.0, situLinearBeta: Double = 0.0): Tensor

linear(input: Tensor, weight: Tensor, bias: Tensor? = null, activation: Activation? = null, situBeta: Double = 0.0, situLinearBeta: Double = 0.0): the linear operator. 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.