Understanding the various loss functions