def compute_accuracy(predictions, labels):
    return labels[predictions.ravel() < 0.5].mean()


# the data, shuffled and split between train and test sets
Compute classification accuracy with a fixed threshold on distances.
dataset/ETHPy150Open fchollet/keras/examples/mnist_siamese_graph.py/compute_accuracy