Skip to main content

PyTorch: model training, autograd and production deployment

Building, training and shipping a neural network with PyTorch, from the first tensor to a model served without any Python.

Course duration: 9h

What you will learn

  • Manipulate PyTorch tensors and interoperate with NumPy without hidden copies
  • Understand autograd, its dynamic graph and the arithmetic of accumulated gradients
  • Structure a model with nn.Module, feed it with a DataLoader and write the training loop by hand
  • Move training to a GPU, enable mixed precision and recover from an interrupted run
  • Reuse a pretrained ResNet with torchvision, then export the final model to TorchScript and ONNX

Prerequisites

  • Python and NumPy (course 02)
  • Deep learning fundamentals (course 07)

Course modules

  1. PyTorch tensors and NumPy interoperability
  2. Autograd: dynamic graph and gradient computation
  3. nn.Module: structuring a model
  4. Dataset and DataLoader: feeding the training loop
  5. Hand-written training and evaluation loop
  6. Optimizers and learning-rate scheduling
  7. GPU training and mixed precision
  8. Checkpoints and resuming training
  9. Transfer learning with torchvision
  10. TorchScript, ONNX and serving

The applied project

The same Fashion-MNIST classifier runs through the ten modules. It starts as raw tensors in module 1, becomes an nn.Module in module 3, is fed by a DataLoader in module 4, receives its first complete loop in module 5, moves to a GPU with mixed precision in module 7, survives a crash in module 8, is replaced by a pretrained ResNet18 in module 9, and finally leaves Python as a TorchScript and ONNX artifact in module 10. One model, one story, from a Jupyter cell to a served endpoint.

Assessment and certificate

The course ends with a 40-question exam covering every module. On success, a certificate of completion is issued immediately; its number can be verified by anyone on the platform.

Free courses, by contrast, end with a 5-question quiz and a certificate preview, without certification.