INFO:main:Resetting environment. ERROR:main:Error applying attack DeepFool:…
- User
INFO:main:Resetting environment. ERROR:main:Error applying attack DeepFool: DeepFool.init() got an unexpected keyword argument 'estimator' ERROR:main:Error creating state: only integers, slices (
:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices ERROR:main:Error applying defense TotalVarMin: 'TotalVarMin' object has no attribute 'defend' INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent:Creating adversarial samples. INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent_pytorch:Success rate of attack: 100.00% ERROR:main:Error applying attack PGD: Improper number of dimensions to norm. ERROR:main:Error creating state: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices ERROR:main:Error applying attack DeepFool: DeepFool.init() got an unexpected keyword argument 'estimator' ERROR:main:Error creating state: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices ERROR:main:Error applying defense TotalVarMin: 'TotalVarMin' object has no attribute 'defend' ERROR:main:Error applying attack DeepFool: DeepFool.init() got an unexpected keyword argument 'estimator' ERROR:main:Error creating state: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices ERROR:main:Error applying defense FeatureSqueezing: 'FeatureSqueezing' object has no attribute 'defend' INFO:art.attacks.evasion.fast_gradient:Using model predictions as correct labels for FGM. INFO:art.attacks.evasion.fast_gradient:Success rate of FGM attack: 0.00% ERROR:main:Error applying attack FGSM: Improper number of dimensions to norm. ERROR:main:Error creating state: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices INFO:art.attacks.evasion.fast_gradient:Using model predictions as correct labels for FGM. INFO:art.attacks.evasion.fast_gradient:Success rate of FGM attack: 0.00% ERROR:main:Error applying attack FGSM: Improper number of dimensions to norm. ERROR:main:Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices ERROR::Error applying attack DeepFool: DeepFool.() got an unexpected keyword argument 'estimator' ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices ERROR::Error applying defense TotalVarMin: 'TotalVarMin' object has no attribute 'defend' ERROR::Error applying attack DeepFool: DeepFool.() got an unexpected keyword argument 'estimator' ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent:Creating adversarial samples. INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent_pytorch:Success rate of attack: 100.00% ERROR::Error applying attack PGD: Improper number of dimensions to norm. ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices INFO:art.attacks.evasion.fast_gradient:Using model predictions as correct labels for FGM. INFO:art.attacks.evasion.fast_gradient:Success rate of FGM attack: 0.00% ERROR::Error applying attack FGSM: Improper number of dimensions to norm. ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices ERROR::Error applying defense FeatureSqueezing: 'FeatureSqueezing' object has no attribute 'defend' INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent:Creating adversarial samples. INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent_pytorch:Success rate of attack: 100.00% ERROR::Error applying attack PGD: Improper number of dimensions to norm. ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices ERROR::Error applying defense FeatureSqueezing: 'FeatureSqueezing' object has no attribute 'defend' INFO:art.attacks.evasion.fast_gradient:Using model predictions as correct labels for FGM. INFO:art.attacks.evasion.fast_gradient:Success rate of FGM attack: 0.00% ERROR::Error applying attack FGSM: Improper number of dimensions to norm. ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent:Creating adversarial samples. INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent_pytorch:Success rate of attack: 100.00% ERROR::Error applying attack PGD: Improper number of dimensions to norm. ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices ERROR::Error applying defense TotalVarMin: 'TotalVarMin' object has no attribute 'defend' INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent:Creating adversarial samples. INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent_pytorch:Success rate of attack: 100.00% ERROR::Error applying attack PGD: Improper number of dimensions to norm. ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices ERROR::Error applying defense TotalVarMin: 'TotalVarMin' object has no attribute 'defend' INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent:Creating adversarial samples. INFO:art.attacks.evasion.projected_gradient_descent.projected_gradient_descent_pytorch:Success rate of attack: 100.00% ERROR::Error applying attack PGD: Improper number of dimensions to norm. ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices ERROR::Error applying defense FeatureSqueezing: 'FeatureSqueezing' object has no attribute 'defend' INFO:art.attacks.evasion.fast_gradient:Using model predictions as correct labels for FGM. INFO:art.attacks.evasion.fast_gradient:Success rate of FGM attack: 0.00% ERROR::Error applying attack FGSM: Improper number of dimensions to norm. ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices ERROR::Error applying defense TotalVarMin: 'TotalVarMin' object has no attribute 'defend' ERROR::Error applying attack DeepFool: DeepFool.() got an unexpected keyword argument 'estimator' ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices ERROR::Error applying defense FeatureSqueezing: 'FeatureSqueezing' object has no attribute 'defend' ERROR::Error applying attack DeepFool: DeepFool.() got an unexpected keyword argument 'estimator' ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices INFO:art.attacks.evasion.fast_gradient:Using model predictions as correct labels for FGM. INFO:art.attacks.evasion.fast_gradient:Success rate of FGM attack: 0.00% ERROR::Error applying attack FGSM: Improper number of dimensions to norm. ERROR::Error creating state: only integers, slices (), ellipsis (), numpy.newaxis () and integer or boolean arrays are valid indices ERROR::Error applying defense FeatureSqueezing: 'FeatureSqueezing' object has no attribute 'defend' INFO:art.attacks.evasion.fast_gradient:Using model predictions as correct labels for FGM. INFO:art.attacks.evasion.fast_gradient:Success rate of FGM attack: 0.00% import random import numpy as np from typing import List, Tuple, Optional, Dict, Any import gym from gym import spaces import torch import torch.nn as nn import torch.optim as optim from torch.nn import functional as F from torchvision import datasets, transforms from art.estimators.classification import PyTorchClassifier from art.attacks.evasion import FastGradientMethod, ProjectedGradientDescent, DeepFool from art.defences.preprocessor import FeatureSqueezing, TotalVarMin from collections import deque import logging from torch.utils.data import DataLoader - Assistant