code: def error_rate(predictions, labels):
    
    return 100.0 - (
        100.0 *
        np.sum(np.argmax(predictions, 1) == np.argmax(labels, 1)) /
        predictions.shape[0])
docs: Return the error rate based on dense predictions and 1-hot labels.