Pytorch Custom Loss Function Tensorflow Playground