Defining a custom training loop and a custom loss class in tensorflow, and when I call the training loop function (marked with @tf.function) I get this error. Any suggestion