OhMyCalc

CNN Convolution Output Size Calculator

Compute the spatial output size, receptive field and per-pixel FLOPs of a 2D convolution from input size, kernel, stride and padding.

How to Use the CNN Convolution Output Size Calculator

  1. Enter input spatial size.
  2. Enter kernel size, stride and padding.
  3. Click Calculate to see output size and receptive field.

حالات الاستخدام

الصيغة

Output = ⌊(input + 2 × padding − kernel) / stride⌋ + 1. Receptive field for one layer equals the kernel size.

الأسئلة الشائعة

What is "same" padding?
Padding that keeps the output size equal to the input size. For a kernel k and stride 1 the required padding is ⌊k/2⌋.
Why does the output have to be integer?
Fractional outputs indicate mis-matched padding. Most frameworks floor the result, losing the right/bottom pixel row — which is why asymmetric padding is sometimes used.
Does this include bias and channels?
No. Multiply params and FLOPs by input × output channels to get layer totals, and add one bias term per output channel.