assert (y_pred != y_pred_adv).any()
if fix_mlFramework in ["keras"]:
k.clear_session()
def test_classifier_type_check_fail_classifier():
// Use a useless test classifier to test basic classifier properties
After Change
return
for classifier in image_classifier_list:
if BoundaryAttack.is_valid_classifier_type(classifier) is False:
continue
attack = BoundaryAttack(classifier=classifier, targeted=False, max_iter=20)
utils_attack._back_end_untargeted_images(attack, classifier, fix_get_mnist_subset, fix_mlFramework)