PyTorch Developer Tools

Free calculators, debuggers, and references for deep learning engineers. All tools run in your browser, no sign-up, no server, no tracking.

Built by Michael Lip

Shape Calculators

Conv2d Output Size Calculator

Calculate output height, width, and channels for PyTorch Conv2d layers.

Shape Calculator

Conv1d Output Size Calculator

Calculate output length for 1D convolutions on sequences and audio.

Shape Calculator

Linear Layer Shape Calculator

Calculate output dimensions for nn.Linear fully connected layers.

Shape Calculator

LSTM Output Shape Calculator

Calculate output shape for LSTM layers including bidirectional and multi-layer.

Shape Calculator

MaxPool2d Output Size Calculator

Calculate pooling output dimensions with kernel, stride, and padding.

Shape Calculator

BatchNorm Shape Calculator

Verify BatchNorm2d configuration and num_features matching.

Shape Calculator

Embedding Layer Shape Calculator

Calculate output shape for nn.Embedding lookup layers.

Shape Calculator

Flatten Output Shape Calculator

See how nn.Flatten collapses dimensions for fully connected layers.

Shape Calculator

ConvTranspose2d Output Size Calculator

Calculate output dimensions for transposed convolutions (upsampling).

Shape Calculator

MultiHead Attention Shape Calculator

Verify transformer attention layer configuration and output shapes.

Shape Calculator

GRU Output Shape Calculator

Calculate output shape for GRU layers including bidirectional mode.

Shape Calculator

LayerNorm Shape Calculator

Verify LayerNorm normalized_shape configuration and parameter count.

Shape Calculator

Conv3d Output Size Calculator

Calculate output depth, height, and width for 3D convolution layers.

Shape Calculator

AdaptiveAvgPool2d Calculator

Calculate output shape for adaptive average pooling layers.

Shape Calculator

Reshape / View Calculator

Validate reshape operations and infer missing dimensions with -1.

Shape Calculator

CNN Receptive Field Calculator

Track receptive field, jump, and start offset across stacked Conv and Pool layers.

Shape Calculator

ViT Patch Embedding Calculator

Patch count, sequence length, and embedding tensor shape for Vision Transformers.

Shape Calculator

Tensor Stride Calculator

Compute contiguous strides and storage offsets to see how PyTorch lays tensors out in memory.

Shape Calculator

Error Debuggers

PyTorch Shape Mismatch Error Debugger

Paste any shape error and get a plain English explanation with fix.

Error Debugger

mat1 and mat2 shapes cannot be multiplied

Fix the most common Linear layer error with dimension analysis.

Error Debugger

CUDA Out of Memory, Solutions

Quick solutions and memory optimization techniques for GPU training.

Error Debugger

view size not compatible, Fix

Understand contiguous memory, view vs reshape, and how to fix it.

Error Debugger

Broadcasting Error Debugger

Fix "cannot be broadcast together" with shape analysis and rules.

Error Debugger

Dimension Out of Range, Fix

Diagnose and fix IndexError for tensor dimension access.

Error Debugger

Expected Input Size Error, Fix

Fix "expected input of size" errors for BatchNorm, Conv, and Linear.

Error Debugger

References

Activation Functions Comparison

Interactive plots, formulas, and pros/cons for ReLU, GELU, SiLU, and more.

Reference

Loss Target Shape Checker

Exact target shape and dtype for 8 PyTorch loss functions, plus the error each mismatch raises.

Loss Functions Guide

Formulas, code examples, and when to use each PyTorch loss function.

Reference

Optimizers Comparison

Adam vs SGD vs AdamW, key parameters, memory usage, and best practices.

Reference

Einsum Calculator

Interactive einsum notation calculator for NumPy and PyTorch.

Reference

Model Analysis

Neural Network Parameter Counter

Add layers and get exact parameter counts with per-layer breakdown.

Model Tool

LLM Model Size Calculator

Size a checkpoint from the parameter count its repo actually stores, with measured GGUF file sizes.

Model Tool

GPU Memory Calculator for Training

Estimate VRAM for parameters, gradients, optimizer states, and activations.

Model Tool

FLOPs Calculator

Estimate floating-point operations per forward pass for your model.

Model Tool

Learning Rate Finder

Simulate LR range test to find optimal learning rate for training.

Model Tool

Model Optimization Calculator

Estimate size reduction, speedup, and accuracy impact of FP16, INT8, INT4 quantization and pruning.

Model Tool

KV Cache Memory Calculator

Estimate transformer KV cache VRAM from layers, heads, head dim, sequence length, batch, and dtype.

Model Tool

Training Setup

Gradient Accumulation Calculator

Work out effective batch size and accumulation steps from micro-batch, GPU count, and target batch.

Training Tool

Weight Decay Scheduler

Visualize constant, linear, cosine, and step decay schedules, with the final and average decay values.

Training Tool

Training Time Estimator

Estimate training wall clock and cloud cost, single GPU against multi-GPU with scaling efficiency.

Training Tool

Data Augmentation Planner

Pick augmentation techniques for vision or text and see the effective dataset multiplier and time cost.

Training Tool

About These Tools

Every tool on this page runs entirely in your browser. No data is sent to any server. No cookies, no analytics, no tracking. The source code is open on GitHub.

These tools are built for ML engineers, researchers, and students who need quick answers about tensor shapes, layer configurations, and training requirements. All formulas match the official PyTorch documentation exactly.

Contact

Built and maintained by Michael Lip. Questions or feedback: [email protected].

By the same builder: GitHub, theluckystrike BeLikeNative, Grammar AI EarlyThunder, Dev Blog Bug Bounty Reality Zovo, AI Dev Tools