Coder Social home page Coder Social logo

Comments (8)

goodfeli avatar goodfeli commented on August 26, 2024

without looking at the code, I bet we're missing a stop_gradient somewhere

from cleverhans.

goodfeli avatar goodfeli commented on August 26, 2024

3.7 seconds per 100 batches for naive training

from cleverhans.

goodfeli avatar goodfeli commented on August 26, 2024

52 sec per 100 batches for adv training

from cleverhans.

goodfeli avatar goodfeli commented on August 26, 2024

in pylearn2, my result with adversarial training takes 3 sec per full epoch

from cleverhans.

goodfeli avatar goodfeli commented on August 26, 2024

in pylearn2, without adversarial training, my code runs in 1 sec per full epoch

from cleverhans.

goodfeli avatar goodfeli commented on August 26, 2024

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.

goodfeli avatar goodfeli commented on August 26, 2024

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.

npapernot avatar npapernot commented on August 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.