Know a great AI tool or AI news source? Submit it to AiByts
PyTorch4 min read

Tensor Shape Cheat Sheet: Every Layer's Input/Output Formula

Quick-reference formulas for every PyTorch layer's output shape. Worked examples with real numbers for Conv2d, Linear, LSTM, MaxPool2d, MultiheadAttention, and more.

By Michael LipHeyTensor Blog

Read the full story

Originally published by HeyTensor Blog on Apr 6, 2026.

Read on HeyTensor Blog(opens in a new tab)

Comments

Sign in to join the discussion.

No comments yet — be the first to share your thoughts.