Returns a dictionary mapping the name of each criterion to a NumPy
    array containing the value of that criterion for each adversarial
    example.
    Subclasses can add extra criteria by implementing the `extra_criteria`
    method.

    :param sess: tf.session.Session
    :param model: cleverhans.model.Model
    :param adv_x: numpy array containing the adversarial examples made so far
      by earlier work in the bundling process
    :param y: numpy array containing true labels
    :param batch_size: int, batch size

def get_criteria(self, sess, model, advx, y, batch_size=BATCH_SIZE):
    """
    Returns a dictionary mapping the name of each criterion to a NumPy
    array containing the value of that criterion for each adversarial
    example.
    Subclasses can add extra criteria by implementing the `extra_criteria`
    method.

    :param sess: tf.session.Session
    :param model: cleverhans.model.Model
    :param adv_x: numpy array containing the adversarial examples made so far
      by earlier work in the bundling process
    :param y: numpy array containing true labels
    :param batch_size: int, batch size
    """

    names, factory = self.extra_criteria()
    factory = _CriteriaFactory(model, factory)
    results = batch_eval_multi_worker(sess, factory, [advx, y],
                                      batch_size=batch_size, devices=devices)
    names = ['correctness', 'confidence'] + names
    out = dict(safe_zip(names, results))
    return out