Loss Functions and Optimizers Explained