def eval_acer(results, is_print=False):
    """
    :param results: np.array shape of (N, 2) [pred, label]
    :param is_print: print eval score
    :return: score
    """
    ind_n = (results[:, 1] == 0)
    ind_p = (results[:, 1] == 1)
    fp = (results[ind_n, 0] == 1).sum()
    fn = (results[ind_p, 0] == 0).sum()
    apcer = fp / ind_n.sum() * 100
    bpcer = fn / ind_p.sum() * 100
    acer = (apcer + bpcer) / 2
    if is_print:
        print('***************************************')
        print('APCER    BPCER     ACER')
        print('{:.4f}   {:.4f}   {:.4f}'.format(apcer, bpcer, acer))
        print('***************************************')
    return 100 - acer