How do loss functions differ when training a model for classification versus regression in computer vision tasks?