You linked the source code for losses, but in most cases there is great general documentation of PyTorch modules and functions, which is formatted with user-friendly style - for the losses (so the code that you’ve linked to) it would be here 2.