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 CalculatorConv1d Output Size Calculator
Calculate output length for 1D convolutions on sequences and audio.
Shape CalculatorLinear Layer Shape Calculator
Calculate output dimensions for nn.Linear fully connected layers.
Shape CalculatorLSTM Output Shape Calculator
Calculate output shape for LSTM layers including bidirectional and multi-layer.
Shape CalculatorMaxPool2d Output Size Calculator
Calculate pooling output dimensions with kernel, stride, and padding.
Shape CalculatorBatchNorm Shape Calculator
Verify BatchNorm2d configuration and num_features matching.
Shape CalculatorEmbedding Layer Shape Calculator
Calculate output shape for nn.Embedding lookup layers.
Shape CalculatorFlatten Output Shape Calculator
See how nn.Flatten collapses dimensions for fully connected layers.
Shape CalculatorConvTranspose2d Output Size Calculator
Calculate output dimensions for transposed convolutions (upsampling).
Shape CalculatorMultiHead Attention Shape Calculator
Verify transformer attention layer configuration and output shapes.
Shape CalculatorGRU Output Shape Calculator
Calculate output shape for GRU layers including bidirectional mode.
Shape CalculatorLayerNorm Shape Calculator
Verify LayerNorm normalized_shape configuration and parameter count.
Shape CalculatorConv3d Output Size Calculator
Calculate output depth, height, and width for 3D convolution layers.
Shape CalculatorAdaptiveAvgPool2d Calculator
Calculate output shape for adaptive average pooling layers.
Shape CalculatorReshape / View Calculator
Validate reshape operations and infer missing dimensions with -1.
Shape CalculatorCNN Receptive Field Calculator
Track receptive field, jump, and start offset across stacked Conv and Pool layers.
Shape CalculatorViT Patch Embedding Calculator
Patch count, sequence length, and embedding tensor shape for Vision Transformers.
Shape CalculatorTensor Stride Calculator
Compute contiguous strides and storage offsets to see how PyTorch lays tensors out in memory.
Shape CalculatorError Debuggers
PyTorch Shape Mismatch Error Debugger
Paste any shape error and get a plain English explanation with fix.
Error Debuggermat1 and mat2 shapes cannot be multiplied
Fix the most common Linear layer error with dimension analysis.
Error DebuggerCUDA Out of Memory, Solutions
Quick solutions and memory optimization techniques for GPU training.
Error Debuggerview size not compatible, Fix
Understand contiguous memory, view vs reshape, and how to fix it.
Error DebuggerBroadcasting Error Debugger
Fix "cannot be broadcast together" with shape analysis and rules.
Error DebuggerDimension Out of Range, Fix
Diagnose and fix IndexError for tensor dimension access.
Error DebuggerExpected Input Size Error, Fix
Fix "expected input of size" errors for BatchNorm, Conv, and Linear.
Error DebuggerReferences
Activation Functions Comparison
Interactive plots, formulas, and pros/cons for ReLU, GELU, SiLU, and more.
ReferenceLoss 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.
ReferenceOptimizers Comparison
Adam vs SGD vs AdamW, key parameters, memory usage, and best practices.
ReferenceEinsum Calculator
Interactive einsum notation calculator for NumPy and PyTorch.
ReferenceModel Analysis
Neural Network Parameter Counter
Add layers and get exact parameter counts with per-layer breakdown.
Model ToolLLM Model Size Calculator
Size a checkpoint from the parameter count its repo actually stores, with measured GGUF file sizes.
Model ToolGPU Memory Calculator for Training
Estimate VRAM for parameters, gradients, optimizer states, and activations.
Model ToolFLOPs Calculator
Estimate floating-point operations per forward pass for your model.
Model ToolLearning Rate Finder
Simulate LR range test to find optimal learning rate for training.
Model ToolModel Optimization Calculator
Estimate size reduction, speedup, and accuracy impact of FP16, INT8, INT4 quantization and pruning.
Model ToolKV Cache Memory Calculator
Estimate transformer KV cache VRAM from layers, heads, head dim, sequence length, batch, and dtype.
Model ToolTraining Setup
Gradient Accumulation Calculator
Work out effective batch size and accumulation steps from micro-batch, GPU count, and target batch.
Training ToolWeight Decay Scheduler
Visualize constant, linear, cosine, and step decay schedules, with the final and average decay values.
Training ToolTraining Time Estimator
Estimate training wall clock and cloud cost, single GPU against multi-GPU with scaling efficiency.
Training ToolData Augmentation Planner
Pick augmentation techniques for vision or text and see the effective dataset multiplier and time cost.
Training ToolAbout 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].