Skip to main content

Deep Learning with PyTorch

This chapter covers PyTorch from tensors to production training loops. Each section includes runnable code examples.

  • Tensors: Creating tensors, dtypes, device placement, views vs copies, broadcasting
  • Autograd: Computational graphs, backward(), gradient accumulation, custom autograd functions
  • nn.Module: Module anatomy, parameter registration, saving/loading state
  • Data Loading: Dataset, DataLoader, IterableDataset, collate_fn, streaming
  • Training Loop: Complete training loop with mixed precision, checkpointing, and logging
  • Debugging: Anomaly detection, shape debugging, NaN detection, memory profiling