Tensorflow Custom Loss Function