Why is the cross entropy loss for all training examples(or the training examples in a batch) averaged over size of the training set(or batch size) ?
Why is it not just summed and used ?
Sum depends on the number of data points, obviously. It is still valid and often used (e.g. when comparable scales in a custom compound loss are needed), assuming the most popular implementations of minibatch learning. The main benefit of averaging is bringing the loss to a uniform scale. This allows: