What problem does it solve? Deep learning code often suffers from hidden bugs like device mismatches, non-reproducible results, broken autograd graphs, and slow data loading. This Skill provides battle-tested PyTorch patterns that prevent these common mistakes when writing models, training loops, and data pipelines. ## Core Features & Use Cases - Training Loop Patterns: Complete train/validation loops with mixed precision (torch.amp), gradient clipping, and proper train/eval mode handling. - Data Pipeline Patterns: Custom Dataset classes, optimized DataLoader configuration (num_workers, pin_memory, persistent_workers), and collate functions for variable-length sequences. - Model & Checkpoint Patterns: Clean nn.Module structure, weight initialization, gradient checkpointing, torch.compile, and full checkpoint save/load for resuming training. - Use Case: When writing a new image classifier training script, apply these patterns to get device-agnostic code, reproducible seeds, AMP-accelerated training, and resumable checkpoints from the start. ## Quick Start Ask the AI to write a PyTorch training loop for an image classifier following pytorch-patterns best practices with mixed precision and checkpointing.