AnalysisBySynthesis icon indicating copy to clipboard operation
AnalysisBySynthesis copied to clipboard

Error while using \scripts\attacks.py"

Open SayanGiri1985 opened this issue 2 years ago • 2 comments

am getting the following error while running \scripts\attacks.py":

fmodel = foolbox.models.PyTorchModel(model, # return logits in shape (bs, n_classes) TypeError: init() got an unexpected keyword argument 'num_classes'

SayanGiri1985 avatar Jun 09 '22 11:06 SayanGiri1985

Resolved the above but now getting the following error: pred_label = np.argmax(fmodel.batch_predictions(b), axis=1) AttributeError: 'PyTorchModel' object has no attribute 'batch_predictions'

SayanGiri1985 avatar Jun 09 '22 13:06 SayanGiri1985

I commented out couple of lines to get read of the above error. Now I am getting the following errors: att = fa.DeepFoolL2Attack(fmodel) AttributeError: module 'foolbox.attacks' has no attribute 'DeepFoolL2Attack'

SayanGiri1985 avatar Jun 09 '22 14:06 SayanGiri1985