Why does my model work with `tf.GradientTape()` but fail when using `keras.models.Model.fit()`
问题 After much effort, I managed to build a tensorflow 2 implementation of an existing pytorch style-transfer project. Then I wanted to get all the nice extra features that are available through Keras standard learning, e.g. model.fit() . But the same model fails when learning through model.fit() . The model seems to learn the content features, but is unable to learn style features. This is the diagram of the model in quesion: def vgg_layers19(content_layers, style_layers, input_shape=(256,256,3)