Example #1
0
 def test_sanitycheck(self):
     JSMAUntargeted.__name__ += "_sanity_check"
     JSMATargeted.__name__ += "_sanity_check"
     # TODO: Fix untargeted version of jsma
     # attack_with_params_dict(attack_params, JSMAUntargeted, show_plot=False, targeted=False)
     attack_with_params_dict(attack_params,
                             JSMATargeted,
                             show_plot=False,
                             targeted=True)
Example #2
0
 def test_sanitycheck(self):
     DeepFool.__name__ += "_sanity_check"
     attack_with_params_dict(attack_params,
                             DeepFool,
                             show_plot=False,
                             targeted=False)
 def test_sanitycheck(self):
     GenAttack.__name__ += "_sanity_check"
     attack_with_params_dict(attack_params, GenAttack, show_plot=False, targeted=True)
Example #4
0
        DATASET_KEY: {
            BATCHES_KEY: 100,
            NMB_ELEMENTS_KEY: 10
        }
    },
    INCEPTION_V3_NAME: {
        PARAMETERS_KEY: params_list,
        DATASET_KEY: {
            BATCHES_KEY: 2,
            NMB_ELEMENTS_KEY: 500
        }
    },
    MOBILENETV2_NAME: {
        PARAMETERS_KEY: params_list,
        DATASET_KEY: {
            BATCHES_KEY: 2,
            NMB_ELEMENTS_KEY: 500
        }
    },
}

if __name__ == "__main__":
    attack_with_params_dict(attack_params,
                            FGSMTargeted,
                            show_plot=False,
                            targeted=True)
    attack_with_params_dict(attack_params,
                            FGSMUntargeted,
                            show_plot=False,
                            targeted=False)
Example #5
0
 def test_sanitycheck(self):
     FGSMTargeted.__name__ += "_sanity_check"
     FGSMUntargeted.__name__ += "_sanity_check"
     attack_with_params_dict(attack_params, FGSMTargeted, show_plot=False, targeted=True)
     attack_with_params_dict(attack_params, FGSMUntargeted, show_plot=False, targeted=False)
Example #6
0
            THETA: 1,
            IS_INCREASING: True,
            USE_LOGITS: False
        }],
        DATASET_KEY: {
            BATCHES_KEY: 10,
            NMB_ELEMENTS_KEY: 100
        }
    },
    LE_NET_NAME: {
        PARAMETERS_KEY: [{
            MAX_PERTURBATION: 0.1,
            THETA: 1,
            IS_INCREASING: True,
            USE_LOGITS: False
        }],
        DATASET_KEY: {
            BATCHES_KEY: 10,
            NMB_ELEMENTS_KEY: 100
        }
    },
}

if __name__ == "__main__":
    # TODO: Fix untargeted version of jsma
    # attack_with_params_dict(attack_params, JSMAUntargeted, show_plot=False, targeted=False)
    attack_with_params_dict(attack_params,
                            JSMATargeted,
                            show_plot=False,
                            targeted=True)
Example #7
0
        }
    },
    LE_NET_NAME: {
        PARAMETERS_KEY: carlini_wagner_params,
        DATASET_KEY: {
            BATCHES_KEY: 100,
            NMB_ELEMENTS_KEY: 10
        }
    },
    INCEPTION_V3_NAME: {
        PARAMETERS_KEY: carlini_wagner_params,
        DATASET_KEY: {
            BATCHES_KEY: 2,
            NMB_ELEMENTS_KEY: 50
        }
    },
    MOBILENETV2_NAME: {
        PARAMETERS_KEY: carlini_wagner_params,
        DATASET_KEY: {
            BATCHES_KEY: 2,
            NMB_ELEMENTS_KEY: 50
        }
    },
}

if __name__ == "__main__":
    attack_with_params_dict(attack_params,
                            CarliniWagner,
                            show_plot=False,
                            targeted=True)
Example #8
0
        }
    },
    LE_NET_NAME: {
        PARAMETERS_KEY: bfgs_params,
        DATASET_KEY: {
            BATCHES_KEY: 100,
            NMB_ELEMENTS_KEY: 10
        }
    },
    INCEPTION_V3_NAME: {
        PARAMETERS_KEY: bfgs_params,
        DATASET_KEY: {
            BATCHES_KEY: 2,
            NMB_ELEMENTS_KEY: 500
        }
    },
    MOBILENETV2_NAME: {
        PARAMETERS_KEY: bfgs_params,
        DATASET_KEY: {
            BATCHES_KEY: 2,
            NMB_ELEMENTS_KEY: 500
        }
    },
}

if __name__ == "__main__":
    attack_with_params_dict(attack_params,
                            BFGS,
                            show_plot=False,
                            targeted=True)
 def test_sanitycheck(self):
     CarliniWagner.__name__ += "_sanity_check"
     attack_with_params_dict(attack_params,
                             CarliniWagner,
                             show_plot=False,
                             targeted=True)
Example #10
0
        }
    },
    LE_NET_NAME: {
        PARAMETERS_KEY: params_list,
        DATASET_KEY: {
            BATCHES_KEY: 100,
            NMB_ELEMENTS_KEY: 10
        }
    },
    INCEPTION_V3_NAME: {
        PARAMETERS_KEY: params_list,
        DATASET_KEY: {
            BATCHES_KEY: 2,
            NMB_ELEMENTS_KEY: 500
        }
    },
    MOBILENETV2_NAME: {
        PARAMETERS_KEY: params_list,
        DATASET_KEY: {
            BATCHES_KEY: 2,
            NMB_ELEMENTS_KEY: 500
        }
    },
}

if __name__ == "__main__":
    attack_with_params_dict(attack_params,
                            DeepFool,
                            show_plot=False,
                            targeted=False)