Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How long should it be to process 70000 img? #24

Open
Junjie-Chu opened this issue Dec 16, 2022 · 2 comments
Open

How long should it be to process 70000 img? #24

Junjie-Chu opened this issue Dec 16, 2022 · 2 comments

Comments

@Junjie-Chu
Copy link

Junjie-Chu commented Dec 16, 2022

Hi, I am trying to use your code to produce an attack dataset (size 70000, hide 32*32 MNIST img in 178*228 CelebA img). And it will cost about 350 hours or more. Is this a normal timing performance?

@EQuiw
Copy link
Owner

EQuiw commented Dec 16, 2022

In the class QuadrScaleAttack,
change
self.optimize_runtime: bool = False
to
self.optimize_runtime: bool = True

Location:

self.optimize_runtime: bool = False

This will make the attack considerably faster, as the optimization problem is solved more efficiently. In future versions, I will set this flag to True per default.
Apart from that, it is difficult to say if your reported time is normal, as it depends on a lot of factors. But the computation takes indeed some time.

@Junjie-Chu
Copy link
Author

Thanks for your quick reply, I will try your advice.

By the way, it seems the repository is not compatible with macOS (Monterey 12.3 and 12.1, I try the code on two Mac). The jupyter kernel always dies when I try to run. After I switch to Ubuntu, everything works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants