Can anyone give me the formula for weighted NLL. I want to know where weights are getting multiplied. I have read this https://pytorch.org/docs/stable/generated/torch.nn.NLLLoss.html 1 but I am not able to understand what $x_{n,y_n}$ is basically. I want to write the formula for weight NLL for C classes. Is the following correct (consider I have correct labels and incorrect labels):

​