What is a loss function in deep learning?
A loss function measures the discrepancy between a model's prediction and the true target. Training minimises it with gradient descent. The choice of loss determines what "correct" means: MSE penalises squared errors for regression, while Cross-Entropy measures probability divergence for classification.