Calculator Inputs
Formula Used
Standard pooling: O = floor((I + Pbefore + Pafter − D(K − 1) − 1) / S + 1)
Effective kernel: Keffective = D(K − 1) + 1
Ceil mode: Replace floor with ceil, then remove windows beginning entirely inside right-side padding.
Pooling reduces spatial dimensions while preserving channels. Kernel size controls each sampled neighbourhood. Stride controls movement between pooling windows.
Valid padding adds no border values. Same padding targets output near input divided by stride. Custom padding accepts different values on each side.
Global pooling returns one value per channel. Adaptive pooling targets an exact output shape. Estimated kernels may vary across adaptive regions.
How to Use
- Select 1D, 2D, or 3D pooling.
- Choose standard, global, or adaptive mode.
- Enter tensor dimensions, channels, and batch size.
- Set kernel, stride, dilation, and padding options.
- Choose framework behaviour and rounding mode.
- Calculate, compare, copy, or export your results.
Example Data
| Input | Kernel | Stride | Padding | Output |
|---|---|---|---|---|
| 32 × 32 | 2 × 2 | 2 × 2 | 0 | 16 × 16 |
| 28 × 28 | 3 × 3 | 2 × 2 | 0 | 13 × 13 |
| 64 × 64 | 3 × 3 | 2 × 2 | 1 per side | 32 × 32 |
| 7 × 7 | 7 × 7 | 1 × 1 | 0 | 1 × 1 |
Frequently Asked Questions
What does pooling output size mean?
It is the spatial shape produced after pooling. Channels usually remain unchanged. Batch size also remains unchanged.
What is the effective kernel size?
Dilation expands the kernel’s covered region. The effective size equals D(K−1)+1. Larger dilation increases receptive coverage.
What is valid padding?
Valid padding adds no values outside the input. Output dimensions usually shrink. Every pooling window stays inside.
What is same padding?
Same padding targets an output based on input divided by stride. Padding is calculated automatically. Odd padding is split asymmetrically.
Why does ceil mode change output size?
Ceil mode keeps a final partial window. Floor mode drops incomplete movement steps. Frameworks may apply edge restrictions.
Does pooling change channels?
Standard spatial pooling normally preserves channel count. Global pooling also preserves channels. Only spatial dimensions are reduced.
What is adaptive pooling?
Adaptive pooling produces a requested output shape. Window boundaries can vary slightly. It avoids manual kernel calculations.
How is global pooling different?
Global pooling reduces every spatial axis to one. Each channel becomes one value. It often precedes classification layers.
Why do frameworks sometimes disagree?
Frameworks differ in padding conventions and ceil handling. Some pooling layers reject dilation. Generated notes highlight these differences.