Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdversarialTrainer parameter name missmatch #2394

Open
danielele77 opened this issue Feb 4, 2024 · 2 comments
Open

AdversarialTrainer parameter name missmatch #2394

danielele77 opened this issue Feb 4, 2024 · 2 comments

Comments

@danielele77
Copy link

The problem occures when AdversarialTrainer is used with model, which is trained with Tensorflow/Keras >V2 and fit function is called on instance of AdversarialTrainer.

The problem is in AdversarialTrainer class fit() function in line 262, where is as paramared used nb_epochs, but this is not correct because Keras in older versions used nb_epoch so the Error is raised as you can see on screenshot below.
image

Keras has back support, but the correct parameter need to be used.
image

To Reproduce
Steps to reproduce the behavior: (see screenshot below)

  1. Create model
  2. Create KerasClassifier with model from step 1
  3. Create attack (e.g. FastGradientMethod)
  4. Create AdversarialTrainer with created attack from step 3 as parameter
  5. Call fit function on AdversarialTrainer instance

Expected behavior
The fit function is exectuted

Screenshots
image

System information (please complete the following information):

  • Ubuntu 20.04.6
  • Python version 3.8
  • ART version "1.16.0"
  • TensorFlow 2.10 / Keras 2.10
@beat-buesser
Copy link
Collaborator

Hi @danielele77 Thank you very much for reporting this issue, we'll fix it as soon as possible. Please let me know if you would be interested to work on a solution for this issue.

@danielele77
Copy link
Author

danielele77 commented Feb 20, 2024

Hi @danielele77 Thank you very much for reporting this issue, we'll fix it as soon as possible. Please let me know if you would be interested to work on a solution for this issue.

Hi @beat-buesser, thank your response. Due to my time availability, I am unfortunately not able to work on a solution to this problem.
Edit: Sorry, for updates of state of the problem

@danielele77 danielele77 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
@danielele77 danielele77 reopened this Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants