Giter VIP home page Giter VIP logo

Comments (2)

tanyuqian avatar tanyuqian commented on May 31, 2024

Thanks for carefully reading our code.

Let's start from augmentation_main.py-line94, generator.finetune_batch() is the function to update \phi (paper Figure 1).

generator.py-line128: get augmented examples for a training data example (paper Equation 9)

classifier.finetune_generator() includes

  • getting \theta'(\phi) = \theta + \nabla_{\theta} L(\theta, \phi) (line 136-142 is computing grads = \nabla_{\theta} L(\theta, \phi)).
  • getting gradients of \phi with dev data (line 150-158).

generator.py-line 131: update \phi according collected gradients of \phi from a batch of examples.

As for the magic_module.py, it is for us to get L(\theta'(\phi)) and gradients of \phi:

  • grads = \nabla_{\theta} L(\theta, \phi) -- classifier.py-line140
  • \theta'(\phi) = \theta + grads -- classifier.py-line148
  • L(\theta'(\phi)) -- classifier.py-line154
  • \nabla_{\phi} L(\theta'(\phi)) -- classifier.py-line158

Hope these can help you. Please let me know if any part is still confusing you.

from learning-data-manipulation.

marscrazy avatar marscrazy commented on May 31, 2024

Thanks for your help.

from learning-data-manipulation.

Related Issues (11)

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.