Inconsistent mathematical description in torch.nn.NLLLoss

http://pytorch.org/docs/master/nn.html#torch.nn.NLLLoss

Here can some explain the maths where size_average=true and reduce=true?
In both summations the indices are same so I am a bit confused

The reduce argument was added to enable easy access to the loss of each instance in the batch, while size_average argument describes the reduction method when reduced=true.

Thanks for your response but that was not my question. If you see the documentation you’ll see there are two summation with same index variable. That’s why I asked this question.