Conv1d Output Size Calculator

Calculate the output length and channels of a PyTorch Conv1d layer. Enter input shape, kernel size, stride, padding, and dilation for instant results.

Built by Michael Lip

Frequently Asked Questions

What is the Conv1d output size formula?

The formula is: L_out = floor((L_in + 2*padding - dilation*(kernel_size-1) - 1) / stride) + 1. Conv1d operates on 1D sequences, so there is only one spatial dimension to compute.

When should I use Conv1d vs Conv2d?

Use Conv1d for 1D sequence data like time series, audio waveforms, or text (after embedding). Use Conv2d for 2D spatial data like images. Conv1d input shape is [batch, channels, length], while Conv2d is [batch, channels, height, width].

What is the input shape for Conv1d?

Conv1d expects input shape [batch_size, in_channels, length]. For example, a batch of 32 audio signals with 1 channel and 16000 samples would be [32, 1, 16000].

About This Tool

This tool is part of HeyTensor, a free suite of PyTorch and deep learning utilities. All calculations run entirely in your browser — no data is sent to any server. The source code is open on GitHub.

Contact

HeyTensor is built and maintained by Michael Lip. For questions or feedback, email [email protected].

📊 Based on real data from our Most Common PyTorch Errors research — 20 errors ranked by frequency