where 𝑁 𝑙 is the number of units in the 𝑙 𝑡ℎ layer and 𝜙 is a nonlinear activation function. As can be seen from the equation above, 𝑊 𝑖𝑗 𝑙 and 𝑏 𝑖 𝑙 define an affine transformation between the (𝑙 -1) 𝑡ℎ and the 𝑙 𝑡ℎ layers. In the absence of 𝜙, the whole MLP is just a sequence of affine transformations which is not capable of capturing nonlinear functional relationships, underscoring the necessity of nonlinearity. Some frequently used nonlinear activations include the Rectified linear units (ReLU), leaky ReLU, hyperbolic tangent (tanh), etc. The selection of the activation function for the output layer is typically dependent on the specific task at hand. For instance, the identity function may be used for regression, the sigmoid function for binary classification, and the softmax function for multi-class classification.