bonni.ActivationType#
- class bonni.ActivationType(*values)[source]#
Enumeration of supported activation functions for neural network layers.
These values are used to configure the non-linearity applied after linear transformations in the model configuration.
- identity#
Applies no activation (f(x) = x). typically used for the final output layer to produce unbounded linear predictions.
- gelu#
Gaussian Error Linear Unit. A smooth approximation of ReLU often used in Transformer architectures and modern MLPs.
- relu#
Rectified Linear Unit (f(x) = max(0, x)). A standard non-linear activation that introduces sparsity.
- leaky_relu#
Leaky Rectified Linear Unit. Similar to ReLU but allows a small, non-zero gradient when the unit is not active.
- sigmoid#
Sigmoid function. Squashes values to the range [0, 1], often used for binary classification probabilities.
- tanh#
Hyperbolic Tangent. Squashes values to the range [-1, 1].
- __init__(*args, **kwds)#
Attributes