3D Convolution Output Shape Calculator for Neural Networks

Use the calculator to instantly predict the shape of a 3-D convolution or pooling layer. Enter input size, filter size, stride, padding and (optionally) pooling values—the tool returns the new depth × height × width × channels. A 3-D kernel trimmed video classification error by 16 % versus 2-D kernels (Tran et al., 2015).

3D Convolution Calculator

Enter the depth of your input volume

Enter the height of your input volume

Enter the width of your input volume

Enter the number of input channels

Enter the size of the 3D filter (assumed to be cubic)

Enter the stride of the convolution

Enter the padding applied to the input volume

Enter the number of filters used in the convolution

Select whether to apply max pooling after convolution

★ Add to Home Screen

Is this tool helpful?

Thanks for your feedback!

How to use the tool

1 Enter input tensor dimensions

  • Depth (Din) – e.g., 45 or 120.
  • Height (Hin) – e.g., 96 or 150.
  • Width (Win) – e.g., 96 or 150.
  • Channels (Cin) – e.g., 16 or 48.

2 Set convolution parameters

  • Filter size (k) – cubic kernel, e.g., 5 or 7.
  • Stride (s) – e.g., 2 or 3.
  • Padding (p) – e.g., 1 or 3.
  • Number of filters (K) – e.g., 32 or 64.

3 (Optional) Configure max-pooling

  • Window size (m) – e.g., 2 or 3.
  • Stride (sp) – e.g., 2 or 3.

4 Formulas applied

Convolution output:

$$ D_{out}= rac{\lfloor D_{in}-k+2p \rfloor}{s}+1,\; H_{out}= rac{\lfloor H_{in}-k+2p \rfloor}{s}+1,\; W_{out}= rac{\lfloor W_{in}-k+2p \rfloor}{s}+1 $$

Pooling output (if used):

$$ D_{pool}= rac{\lfloor D_{out}-m \rfloor}{s_p}+1,\; H_{pool}= rac{\lfloor H_{out}-m \rfloor}{s_p}+1,\; W_{pool}= rac{\lfloor W_{out}-m \rfloor}{s_p}+1 $$

All divisions are integer floor operations (Goodfellow et al., 2016).

Example 1
  • Input (48, 96, 96, 16); k = 5, s = 2, p = 1, K = 32.
  • Convolution ⇒ (23, 47, 47, 32).
  • Pooling with m = 2, sp = 2 ⇒ (11, 23, 23, 32).
Example 2
  • Input (30, 64, 64, 8); k = 3, s = 1, p = 1, K = 12.
  • Convolution ⇒ (30, 64, 64, 12). No pooling.

Quick-Facts

  • Formula mirrors torch.nn.Conv3d implementation (PyTorch Docs, 2023).
  • ‘Same’ padding achieves p = ⌊k/2⌋ (Goodfellow et al., 2016).
  • Typical pooling stride equals window size, usually 2 (Krizhevsky et al., 2012).
  • 3-D kernels improved action-recognition accuracy by 16 % (Tran et al., 2015).

FAQ

What formula does the calculator use?

It applies the standard discrete convolution size rule with integer flooring, identical to PyTorch and TensorFlow layers (PyTorch Docs, 2023).

Why include padding?

Padding lets filters scan border voxels and can keep output size unchanged when p = ⌊k/2⌋ (Goodfellow et al., 2016).

How do strides affect memory use?

Higher strides shrink feature maps, cutting memory and computation roughly by s³ for 3-D data (Albawi et al., 2017).

Can I simulate 2-D convolution?

Yes—set depth to 1; the formula then collapses to 2-D output dimensions (PyTorch Docs, 2023).

What is a typical pooling stride?

Most CNNs use stride 2 with 2×2×2 windows, halving each spatial axis (Krizhevsky et al., 2012).

How many filters should I pick?

Start with 32–64 filters; residual networks double filters every stage for richer features (He et al., 2016).

Why does the tool display “invalid output”?

Negative or zero outputs indicate incompatible k, s or p values—adjust inputs until each numerator exceeds zero.

Does the tool round or floor divisions?

It always floors fractional quotients, following deep-learning framework conventions (Goodfellow et al., 2016).

Important Disclaimer

The calculations, results, and content provided by our tools are not guaranteed to be accurate, complete, or reliable. Users are responsible for verifying and interpreting the results. Our content and tools may contain errors, biases, or inconsistencies. We reserve the right to save inputs and outputs from our tools for the purposes of error debugging, bias identification, and performance improvement. External companies providing AI models used in our tools may also save and process data in accordance with their own policies. By using our tools, you consent to this data collection and processing. We reserve the right to limit the usage of our tools based on current usability factors. By using our tools, you acknowledge that you have read, understood, and agreed to this disclaimer. You accept the inherent risks and limitations associated with the use of our tools and services.

Create Your Own Web Tool for Free