Pytorch Custom Loss Function In Keras