Loss-Functions Different Loss Function Implementations in PyTorch and Keras Found this gem from https://www.kaggle.com/bigironsphere/loss-function-library-keras-pytorch/notebook. Works like a charm!