Lecture 3: Loss Functions and Optimization