Hyperparticle / one-pixel-attack-keras

Keras implementation of "One pixel attack for fooling deep neural networks" using differential evolution on Cifar10 and ImageNet

Home Page:https://arxiv.org/abs/1710.08864

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'DenseNet' object has no attribute '_model'

fxle opened this issue · comments

commented

pylint E0401:unable to import 'keras.utils'
unable to import networks.capsulenet.capsule_net
when i uesed ''python attack.py --model densenet capsnet'',the above problems appeared,Who can help me t how to solve it?tanks a lot

Did you make sure you have downloaded the densenet.h5 and capsnet.h5 models and put them in the models directory? Also, make sure you're running an up-to-date version of Keras.

commented

But I can't find the densenet.h5 and capsnet.h5 models .Can you provide me with this download link?Thank you very much.

You can find the link in the Cifar10 Jupyter notebook, under the "Load Models" section. Alternatively, you can train the models yourself.
https://www.dropbox.com/sh/dvatkpjl0sn79kn/AAC9L4puJ_sdFUkDZfr5SFkLa?dl=0

Have you solved your issue?

commented

Yeah,Thank you for your concern. I have solved it and got the result.but how to show the results.pkl?

To show the results.pkl, you can use something like helper.load_results() and load the data into a Pandas DataFrame, as seen in the "Attack Statistics" section of the notebook.

commented

Ok Thanks