Custom Activation Functions#
This module defines custom activation functions used in neural networks.
Description#
CReLU (Concatenated ReLU) [1] applies ReLU activation to both the input and its negation, then concatenates the results along the last dimension:
\[\text{CReLU}(x) = \text{ReLU}([x, -x])\]
This doubles the number of features and enhances the representational capacity of the network.
Classes#
- class objectrl.utils.custom_act.CReLU[source]#
Bases:
ModuleConcatenated ReLU (CReLU) activation module.
This module implements the CReLU activation function, which concatenates the ReLU activations of both the input and its negation along the last dimension:
CReLU(x) = ReLU([x, -x])
This increases the representational capacity of the model by doubling the number of features while preserving non-linearity.
References