1.11 Training code walkthrough: Training loop