You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 18, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 18, 2024. It is now read-only.
I have seen the wrapper. It has 2 major problems. 1. The implementation is not efficient. The original implementation uses multitasking library while theirs is a serial implementation.
2. The implementation is incomplete. The original code estimates the c_init while that's not implemented in the wrapper.
@kfarivar I agree with you that the original implementation is more efficient. I did a lot of multiprocessing optimizations to fully utilize the GPU. The new implementation was done by an independent team which focuses more on functionality rather than performance.
It is possible to change the original implementation to use a PyTorch model. CLEVER is a sampling based method so as long as you can integrate pytorch model inference into the code, everything else should work. More precisely, you will need to replace this tensorflow sess.run with a pytorch model inference:
Activity
pinyuchen commentedon Jun 9, 2021
Hello @kfarivar
You can use the general wrapper from IBM Adversarial Robustness Toolbox: https://adversarial-robustness-toolbox.readthedocs.io/en/stable/modules/metrics.html
huanzhang12 commentedon Jun 10, 2021
Thank you @pinyuchen for the answer. Let us know if you have any further questions.
kfarivar commentedon Jun 12, 2021
I have seen the wrapper. It has 2 major problems. 1. The implementation is not efficient. The original implementation uses multitasking library while theirs is a serial implementation.
2. The implementation is incomplete. The original code estimates the c_init while that's not implemented in the wrapper.
huanzhang12 commentedon Jun 12, 2021
@kfarivar I agree with you that the original implementation is more efficient. I did a lot of multiprocessing optimizations to fully utilize the GPU. The new implementation was done by an independent team which focuses more on functionality rather than performance.
It is possible to change the original implementation to use a PyTorch model. CLEVER is a sampling based method so as long as you can integrate pytorch model inference into the code, everything else should work. More precisely, you will need to replace this tensorflow
sess.runwith a pytorch model inference:https://github.com/huanzhang12/CLEVER/blob/master/estimate_gradient_norm.py#L461
Most other things can be kept unchanged, including the multitasking part. However it does need some efforts if you plan to take this route.
liuyiming199721 commentedon Sep 16, 2023
Hello, is there an easy way to use your pytorch models?