ValueError when adding tf.keras.metrics.Precision to model metrics in TensorFlow
I’m trying to apply transfer learning using MobileNet on a custom dataset. My code works fine until I add tf.keras.metrics.Precision(name=”precision”) to the model’s metrics. After adding this metric, I encounter the following error during model.fit: