MaxoutActivation<T>

Models & Types · AiDotNet.ActivationFunctions

Implements the Maxout activation function for neural networks.

Inheritance: ActivationFunctionBase<T> → MaxoutActivation<T>

For Beginners

The Maxout activation function is different from most activation functions. Instead of applying a mathematical formula to each value, it:

  1. Groups your input values into small sets (e.g., groups of 2, 3, or more values)
  2. For each group, it selects only the largest (maximum) value
  3. The output is smaller than the input (it’s reduced by a factor equal to the group size)

For example, with groups of 2 (numPieces = 2): Input: [1, 5, 3, 7] Groups: [1, 5] and [3, 7] Output: [5, 7] (the maximum value from each group)

Maxout is powerful because it can learn to approximate many different activation functions, making it very flexible. However, it requires more parameters in your neural network.

Constructors

Constructor Summary
MaxoutActivation(int numPieces) Creates a new instance of the Maxout activation function.

Methods

Method Summary
Matrix<T> Derivative(Vector<T> input) Calculates the derivative (Jacobian matrix) of the Maxout function for a vector input.
Tensor<T> Activate(Tensor<T> input) Applies Maxout to a tensor via engine primitives so the gradient tape records every step.
Vector<T> Activate(Vector<T> input) Applies Maxout to a tensor via engine primitives so the gradient tape records every step.