I want to define a new loss function similar to the one defined in the action recognition using visual attention paper i.e. eq. 7.
I thought it would be useful to use the NLL Loss defined in PyTorch as a guide but I can’t seem to find the source code. What I found on github was this but I do not see its implementation [here] (https://github.com/pytorch/pytorch/blob/master/torch/nn/_functions/thnn/loss.py).
Would anyone be kind enough to post the link to the source code?