Class SiLU
java.lang.Object
io.github.kirstenali.deepj.activations.SiLU
- All Implemented Interfaces:
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.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SiLU
public SiLU()
-
-
Method Details
-
forward
- Specified by:
forwardin interfaceActivationFunction
-
backward
- Specified by:
backwardin interfaceActivationFunction
-