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

About loss_ab and loss_ba in eq(8) #2

Open
chenchongthu opened this issue Jan 31, 2023 · 1 comment
Open

About loss_ab and loss_ba in eq(8) #2

chenchongthu opened this issue Jan 31, 2023 · 1 comment

Comments

@chenchongthu
Copy link

It seems that there is only loss_ab in the released code, right?

@ma787639046
Copy link
Member

Hi, sorry for the late reply. I didn't get a notification about this raised issue.
As implemented in CotMAECollator.call of data.py, we unpacked a text span (anchor) and its contextual span together for forwarding the encoder model. They both produce MLM loss, so we get loss_ab + loss_ba together in one MLM loss of the encoder.
https://github.com/caskcsg/ir/blob/ba950cabe3f5cead495f6e3bec119ce3f48b666f/cotmae/data.py#L186

Feel free to ask me if you have any further questions.

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

2 participants