kabkabm / defensegan

Defense-GAN: Protecting Classifiers Against Adversarial Attacks Using Generative Models (published in ICLR2018)
Apache License 2.0
229 stars 62 forks source link

Error while running in python 3.5 #18

Open naveeen684 opened 4 years ago

naveeen684 commented 4 years ago

absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'cfg'. Did you mean: cfg_path ?

This error arrises while running "python train.py --cfg experiments/cfgs/gans/mnist.yml --is_train" It arrises at "C:\Users\ELCOT\defensegan\utils\config.py", line 77, in load_config if hasattr(flags, k.lower()) this place.

Originofamonia commented 4 years ago

I have the same issue.

naveeen684 commented 4 years ago

Hi sir, I found the solution . Please use Linux or Mac OS rather than using Windows. Because in Windows python supports tensorflow only in version 3. But the defence gan code is written in python2. In windows python2 doesn't have tensorflow support. At the same time Linux distributions has the tensorflow support even in python 2 so my preference is use Ubuntu or MacOS and install python 2, then install the prescibed tensorflow version(given in readme) then do the same steps you will get the output. Thank you:)

On Thu, Mar 19, 2020, 12:26 AM originofamonia notifications@github.com wrote:

I have the same issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kabkabm/defensegan/issues/18#issuecomment-600804257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMQGJTSZ4FOYMATEJWQBSQTRIEKMFANCNFSM4KFWAP6A .

1993cathyzhao1993 commented 3 years ago

Come on!That‘s said me