Skip to main content
Loading page…
Python Mastery
Chapter 45
Lesson 2 of 4
Building Neural Networks
Contents
Notes
Tutor
Concept
nn.Module: The Base Class for All Models
Loading activity…
Previous
1 / 8
Continue
Contents
Notes
Discussion
Tutor
25 min
8 activities
0 of 8 done
In this lesson
1
nn.Module: The Base Class for All Models
2
Linear Layers and Activations
3
Loss Functions
4
Optimizers
5
Inspecting a Model's Parameters
6
Check: Why Not Apply Softmax Before CrossEntropyLoss?
7
Correct Order of Optimizer Calls
8
Loss Functions by Task
Objectives
Define a custom neural network by subclassing nn.Module and implementing forward()
Compose linear layers and activation functions to build a feedforward network
Choose an appropriate loss function for classification or regression tasks
Instantiate an optimizer and understand what its step() method does
Inspect and count a model's trainable parameters
Further reading
PyTorch tutorials
PyTorch API reference
Chapter 45 · Deep Learning with PyTorch
Tensors & Autograd
Building Neural Networks
The Training Loop
Deep Learning in Practice
Previous: Tensors & Autograd
Next: The Training Loop