01Loss, cost, objective — and why it must be differentiable
Loss is the error on one example. Cost is the average over a batch or the whole dataset. Objective is whatever you're actually minimising, which is cost plus any regularisation terms. The words get used loosely; the distinction matters when reading papers.
The binding constraint is differentiability. Gradient descent needs a slope at every point to know which way to move. Accuracy has no usable slope — nudge a weight and accuracy either doesn't change at all or jumps discontinuously when a prediction crosses the threshold. That's why you never train on accuracy, and why every practical loss is a smooth surrogate for the thing you really want.
The point
Loss ≠ metric. Loss is what the optimiser can act on; the metric is what the business cares about. If they point in different directions, you'll ship a model with a beautiful loss curve and a bad product.