java.lang.Object
io.github.kirstenali.deepj.activations.SiLU
All Implemented Interfaces:
ActivationFunction

public final class SiLU extends Object implements ActivationFunction
Sigmoid Linear Unit (SiLU / Swish).

Forward: SiLU(x) = x · σ(x)

Backward: SiLU'(x) = σ(x) · (1 + x · (1 − σ(x)))

Used as the gate activation inside SwiGLULayer and is the standard FFN activation in Llama, Mistral, and Qwen.