cg563 / simple-blackbox-attack

Code for ICML 2019 paper "Simple Black-box Adversarial Attacks"
MIT License
191 stars 56 forks source link

How to load the dataset? #3

Closed qilong-zhang closed 4 years ago

qilong-zhang commented 4 years ago

Hi,

I want to run the code, but I don't have the .pth file

# this is to ensure all attacks are run on the same set of correctly classified images
batchfile = '%s/images_%s_%d.pth' % (args.sampled_image_dir, args.model, args.num_runs)

So the .pth file should make by myself? Thanks!

cg563 commented 4 years ago

The .pth file will be generated automatically as long as you specify the --data_root parameter. Please close the issue if the code runs fine.

qilong-zhang commented 4 years ago

Thanks!I apologize for my negligence。

MaybeJT commented 4 years ago

Hi bro!Have you deal with the dataset problem?Should I download all ImageNet dataset?Or I just need to creat a new dictionary?

cg563 commented 4 years ago

You do need the full ImageNet test set to generate a .pth file. After that you should be able to read from the .pth file every time.