Trusted-AI / adversarial-robustness-toolbox

Adversarial Robustness Toolbox (ART) - Python Library for Machine Learning Security - Evasion, Poisoning, Extraction, Inference - Red and Blue Teams
https://adversarial-robustness-toolbox.readthedocs.io/en/latest/
MIT License
4.86k stars 1.16k forks source link

Version not implemented error when carrying out Neural Cleanse Defense #871

Open mpandya18 opened 3 years ago

mpandya18 commented 3 years ago

Dear Sir/Madam,

I have tried to run the Neural Cleanse Defense as per the notebook example provided. Unfortunately I keep on running into a NotImplementedError: Only Keras classifiers (v2.2.4) are supported for this defence.

I have tried installing and running with keras version 2.2.4 only and still get the same error. Could you let me know how I can resolve this and perhaps send me some sample code that is running correctly? I have attached my code as a PDF file.

Deep Learning Experimentation - ART - CNN - Neural Cleanse Testing - Jupyter Notebook.pdf

beat-buesser commented 3 years ago

Hi @mpandya18 Thank you very much for reporting this issue!

@ebubae What do you think? Would it be possible to support other versions of Keras?

beat-buesser commented 3 years ago

Hi @mpandya18 I took a closer look at the code in your pdf. Have you tired restarting the notebook's kernel or the entire notebook after installing the new Keras version?

mpandya18 commented 3 years ago

Hi @beat-buesser thanks for your response. I tried doing as you suggested and I now get a AttributeError: module 'tensorflow' has no attribute 'get_default_graph' error. I've attached the code as a PDF. I'm guessing this has to do with version mismatch though I'm not sure how to rectify this. Could you let me know if there is any solution you can think of? Deep Learning Experimentation - ART - CNN - Neural Cleanse Testing.pdf

ebubae commented 3 years ago

Hey @mpandya18 thanks for using ART!

The current version of Neural Cleanse is only tested with work with TF v1.14. We will be adding compatibility fixes in #757. Do you still have issues when using TF1?