Keras metrics with TF backend vs tensorflow metrics
问题 When Keras 2.x removed certain metrics, the changelog said it did so because they were "Batch-based" and therefore not always accurate. What is meant by this? Do the corresponding metrics included in tensorflow suffer from the same drawbacks? For example: precision and recall metrics. 回答1: Let's take precision for example. The stateless version which was removed was implemented like so: def precision(y_true, y_pred): """Precision metric. Only computes a batch-wise average of precision.