I’m using Tensorflow 2 to train a binary classification model. I pass the metrics [‘accuracy,’ tf.keras.metrics.Precision() tf.keras.metrics.Recall()] but accuracy, precision, and recall are all the same at every point in time. How to calculate precision and recall correctly?
For Keras version 2 precision and recall were removed from the master branch. Whereas in version 2.3.0 they are provided with library package. You can try using later version.
you can also refer to the metrics in keras.io