Comments (2)
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 computinggrads = \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-line148L(\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.
Thanks for your help.
from learning-data-manipulation.
Related Issues (11)
- I can't produce the result in this paper HOT 4
- AttributeError: 'MagicModule' object has no attribute '_forward_impl' HOT 1
- A little question towards running the augmentation part for this code HOT 2
- The hyperparameters on TREC dataset
- question about data_seed HOT 2
- code quesiton HOT 1
- question about num_aug HOT 1
- question about magic_model HOT 2
- question about training speed based on a big validation set size HOT 4
- AttributeError: can't set attribute HOT 1
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 learning-data-manipulation.