Implementation details of the loss criterion

I’m trying to read the source code but confused about where the loss criterion is implemented.

For example, it seems to me MSEloss, KLDivLoss etc are implemented in /torch/nn/modules/
But they are actually empty function ( “pass”)

I also checked /torch/nn/_functions/thnn , but couldn’t find the implementation details there


they are implemented in C here:

1 Like