Skip to main content

ClikaRT::nn::SwiGLU

class

Header: ClikaRT/nn/generated/activation.h
Inherits: ClikaRT::nn::Module

SwiGLU over a concatenated [*, 2d] gate-then-up input, emitting [*, d]: (clamp(up, -limit, limit) + beta) * G * sigmoid(alpha * G) with G = min(gate, limit); the defaults reduce to silu(gate) * up. The module form of ClikaRT::ops::swiglu, which documents the full contract (shapes, dtypes, errors); construct once, then call it like a function.

Member functions​

SwiGLU()​

explicit SwiGLU(SwiGLUOptions options = {})

Constructs the module from options (every default when omitted).

Declared in ClikaRT/nn/generated/activation.h, line 1242

forward()​

Tensor forward(Tensor input) const

forward_impl, unwrapped: raises ClikaRT::Error on failure.

Declared in ClikaRT/nn/generated/activation.h, line 1254

operator()()​

Tensor operator()(Tensor input) const

Same as forward.

Declared in ClikaRT/nn/generated/activation.h, line 1258

options()​

const SwiGLUOptions& options() const

The settings this module was constructed with.

Declared in ClikaRT/nn/generated/activation.h, line 1262