inox.nn.pooling#
Pooling layers
Classes#
Descriptions#
- class inox.nn.pooling.AvgPool(window_size, stride=None, padding=0)#
Creates an average spatial pooling layer.
- Parameters:
- __call__(x)#
- Parameters:
x (Array) – The input tensor \(x\), with shape \((*, H_1, \dots, H_n, C)\).
- Returns:
The output tensor \(y\), with shape \((*, H_1', \dots, H_n', C)\), such that
\[H_i' = \left\lfloor \frac{H_i - k_i + p_i}{s_i} + 1 \right\rfloor\]where \(k_i\), \(s_i\) and \(p_i\) are respectively the window size, the stride coefficient and the total padding of the \(i\)-th spatial axis.
- Return type:
- class inox.nn.pooling.MaxPool(window_size, stride=None, padding=0)#
Creates a maximum spatial pooling layer.
- Parameters:
- __call__(x)#
- Parameters:
x (Array) – The input tensor \(x\), with shape \((*, H_1, \dots, H_n, C)\).
- Returns:
The output tensor \(y\), with shape \((*, H_1', \dots, H_n', C)\), such that
\[H_i' = \left\lfloor \frac{H_i - k_i + p_i}{s_i} + 1 \right\rfloor\]where \(k_i\), \(s_i\) and \(p_i\) are respectively the window size, the stride coefficient and the total padding of the \(i\)-th spatial axis.
- Return type: