コード例 #1
0
    def _get_attack_classifier_list(**kwargs):
        if framework == "pytorch":
            return get_attack_classifier_pt(**kwargs)

        raise ARTTestFixtureNotImplemented(
            "no estimator available", image_dl_estimator_for_attack.__name__,
            framework)
コード例 #2
0
    def _get_attack_classifier_list(one_classifier=False, **kwargs):
        if framework == "keras":
            logging.warning(
                "{0} doesn't have an image attack defined yet".format(
                    framework))
            classifier_list = None
        if framework == "tensorflow":
            logging.warning(
                "{0} doesn't have an image attack defined yet".format(
                    framework))
            classifier_list = None
        if framework == "pytorch":
            classifier_list = [get_attack_classifier_pt(**kwargs)]
        if framework == "scikitlearn":
            logging.warning(
                "{0} doesn't have an image attack defined yet".format(
                    framework))
            classifier_list = None

        if classifier_list is None:
            return None

        if one_classifier:
            return classifier_list[0]

        return classifier_list