Module 09 · Lesson 4 of 11Pro
Building a neural network in PyTorch
- Level
- Beginner
- Reading time
- 14 min
When you finish this page you can
- Build a complete PyTorch classifier from a Dataset, a DataLoader, an nn.Module subclass, a loss and an optimizer.
- Follow a batch’s shape from photos to class scores, and count the model’s parameters from its layers.
- Say what model.train(), model.eval() and torch.no_grad() each change, and when each one is needed.
- Save a trained model’s state_dict and load it into fresh code for predictions.