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.92k stars 1.17k forks source link

bug in pytorch_deep_speech #2043

Open doosenn opened 1 year ago

doosenn commented 1 year ago

I installed the latest DeepSpeech from https://github.com/SeanNaren/deepspeech.pytorch, and when I use art.estimators.speech_recognition.PyTorchDeepSpeech, it raises NotImplementedError("Only DeepSpeech version 2 and DeepSpeech version 3 are currently supported."). The lastest DeepSpeech.base appears to be <class 'pytorch_lightning.core.module.LightningModule'>, not <class 'pytorch_lightning.core.lightning.LightningModule'>.

beat-buesser commented 1 year ago

Hi @doosenn Thank you very much for reporting this issue and providing a possible solution! Does changing this line https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/ee0c4b6c165157f5a65799a0b92a9de6634f62a9/art/estimators/speech_recognition/pytorch_deep_speech.py#L149 to

        elif str(DeepSpeech.__base__) == "<class 'pytorch_lightning.core.module.LightningModule'>":

solve the issue for you?