Custom loss functions - PyTorch Forums
discuss.pytorch.org › t › custom-loss-functionsNov 12, 2018 · Hi, I’m implementing a custom loss function in Pytorch 0.4. Reading the docs and the forums, it seems that there are two ways to define a custom loss function: Extending Function and implementing forward and backward methods. Extending Module and implementing only the forward method. With that in mind, my questions are: Can I write a python function that takes my model outputs as inputs and ...