Comments (8)
without looking at the code, I bet we're missing a stop_gradient somewhere
from cleverhans.
3.7 seconds per 100 batches for naive training
from cleverhans.
52 sec per 100 batches for adv training
from cleverhans.
in pylearn2, my result with adversarial training takes 3 sec per full epoch
from cleverhans.
in pylearn2, without adversarial training, my code runs in 1 sec per full epoch
from cleverhans.
naive training is forward-back, O(2).
adversarial training is forward-back, back(with different targets)-forward-back, so O(5) if no steps can be parallelized. So it should be roughly 2.5X slower than naive training in theory.
The pylearn2 implementation is 3X slower than naive training, so apparently in practice we can expect some extra overhead.
Doesn't explain why this is > 10X slower.
from cleverhans.
whoa, actually something is seriously weird.
1st 100 batches with adv training take 54 seconds
2nd 100 batches take 102 seconds
3rd 100 batches take 153 seconds
from cleverhans.
You are right: the issue was due to my naive implementation which redefined the adversarial loss in the TF graph at each iteration (batch...). I fixed by introducing a new function that add the loss to the graph, and which returns the TF var to be evaluated at each iteration d7a95d3
from cleverhans.
Related Issues (20)
- Survey on globally distributed software engineering HOT 1
- Torch implemantation of the fast gradient method HOT 5
- Is there any problem in my code of FGSM and I-FGSM? plz HELP HOT 14
- Adam for PGD / BIM attacks HOT 1
- ModuleNotFoundError: No module named 'cleverhans.utils_tf'
- ModuleNotFoundError: No module named 'cleverhans.attacks' HOT 4
- DeepFool and ElasticNet attacks for TF2 in cleverhans v4.0.0 HOT 1
- Is there code ZOO: Zeroth Order Optimization Based Black-box Attacks to Deep Neural Networks without Training Substitute Models?
- Fast gradient Method doesn't work for double precision: Suggestion for the fix HOT 1
- Predicted Class Labels HOT 1
- Tensorflow 2 C&W2 implementation targeted bug
- Distributed Adversarial Examples Generation
- cleverhans.torch.utils.clip_eta will cause GPU memory leaking for its in-place operation HOT 1
- JAX attacks depend on experimental features that does not exist
- 'get_shape' Attribute
- Missing non-linearity in torch/mnist_tutorial.py HOT 1
- Issue Running CW Attack with PyTorch
- TF2: CarliniWagnerL2 fails if argument `y` is provided and batch size is unequal to number of samples
- Tensorflow and Keras compatible versions for Cleverhans==3.1.0
- Model Zoo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cleverhans.