Exercise hints
For DL-C17-C-001, multiply the two dimensions.
For DL-C17-C-002, a linear layer with bias has outputs * inputs weight
entries and outputs bias entries.
For DL-C17-C-003, use the SGD update rule directly.
For DL-C17-C-004, divide examples by batch size.
For DL-C17-C-005, separate gradient computation from parameter update.
For DL-C17-C-006, ask what the optimizer is allowed to change.
For DL-C17-C-007, ask what must be saved so the model can make the same
predictions later.
Written practice hints
Use the earlier training loop vocabulary: batch, forward pass, loss, gradient, update.
For zero_grad(), remember that PyTorch accumulates gradients unless they are
cleared.
For modules and parameters, distinguish the container from the trainable tensors inside it.