cleverhans-lab / cleverhans

An adversarial example library for constructing attacks, building defenses, and benchmarking both
MIT License
6.2k stars 1.39k forks source link

Cleverhans adversarial generation is extreamly slow #1173

Closed Jeevi10 closed 3 years ago

Jeevi10 commented 4 years ago

if attack =="fsgm": fgsm = FastGradientMethod(DQNModel(model,env.action_space.n),model.sess) adv_x = fgsm.generate(obs_ph1, **fgsm_params)

adv_xin = model.sess.run(adv_x,{obs_ph: np.array(obs)[None]})*255.0

model= stable baseline DQN model. DQNModel= cleverhans Model to create frop obs_ph1,obs_ph = stable baseline placeholders. When use this to generate adversarial examples for RL. Its extremely slow. if I increase the epsilon value the generation become faster. Can you please help with this issue?

jonasguan commented 3 years ago

Hey @Jeevi10 , FGSM isn't computationally intensive and shouldn't be very slow. Are you running on a GPU?

I'm going to close this issue for now since it's inactive for a while, and we're about to make some major updates. If you're still having similar problems, feel free to reopen an issue and mention this one.