Comments (2)
看名字知道您是**人,所以冒昧用中文提issue了。
1、这个magic model怎么就能做到这样,dev_loss为什么会更新generator的参数呢?
2、这里是用到了前一次classifer到梯度了吗
deltas = _adam_delta(self._optimizer, self._model, grads)
magic_model.update_params(deltas)
from learning-data-manipulation.
Yes, you are right:) I'll use English to reply for possible inspirations to everyone.
"how to understand magic_model?" -- It's for running a specified model (e.g., BERT) whose parameters are the sum of multiple sets of parameters (e.g., \theta + \theta'(\phi)
) while we don't need to re-write the original forward() function. Our implementation is a bit like a hack to PyTorch.Module. If you have better ways to do it, please let me know.
"why can dev_loss.backward() update the Generator weight?" -- In the code, the route of gradient propagation is dev_loss (classifier.p::Line154) -> deltas (Line 147) -> grads (Line 140) -> aug_probs (Line 119) -> generator parameters (via gumbel_softmax, generator.py::Line104)
. For the correspondence between our paper and code, please refer to this.
Sorry that I don't quite understand your question "这里是用到了前一次classifer到梯度了吗". Could you specify it more detailedly?
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
- Two small issues about the paper and 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 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.