tf.keras.metrics.binary_accuracy

tf.keras.metrics.binary_accuracy(
    y_true,
    y_pred,
    threshold=0.5
)

Defined in tensorflow/python/keras/metrics.py.