I want to use a pretrained TensorFlow model inside a custom loss function to train another model, but get an error message. I am using TensorFlow