Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the implementation of the loss function #7

Open
Weiting-Gao opened this issue May 31, 2024 · 0 comments
Open

Questions about the implementation of the loss function #7

Weiting-Gao opened this issue May 31, 2024 · 0 comments

Comments

@Weiting-Gao
Copy link

Thanks for sharing the code! I read the paper and also checked the code. I’m currently trying to adopt Diffmask to another dataset and have some questions regarding the code:

  1. What is alpha (defined in sentiment_classification_sst_diffmask.py BertSentimentClassificationSSTDiffMask), is that Lagrangian multiplier mentioned in Eq(3) in the paper?

  2. In SentimentClassificationSSTDiffMask, What is the expected_L0 in loss_g, why expected_L0 is negative? The negative value of expected_L0 makes loss_g negative. Is that correct?

  3. I also don’t understand log_expected_L0() function in distributions.py. Can I find an explanation for this in the paper?

  4. During the training step, you also calculate l0 (l0 = (expected_L0.exp() * mask).sum(-1) / mask.sum(-1)), what is this for, is this used for training?

Again, thanks for the wonderful work. Look forward to your reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant