Pytorch Custom Loss Function Tensorflow Pypi