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

All candidate pair scores? #4

Open
sunilitggu opened this issue Apr 29, 2018 · 4 comments
Open

All candidate pair scores? #4

sunilitggu opened this issue Apr 29, 2018 · 4 comments

Comments

@sunilitggu
Copy link

Hi
I was trying to understand the code. I found that you are feeding an abstract separately for each candidate pair of the abstract in the model. However, in the paper, it is written once for all candidate pairs.

Am I missing something?

Thanks

@patverga
Copy link
Owner

patverga commented May 1, 2018

Currently the code is doing some redundant computation, re-encoding the abstract for each entity pair. However, it is computing the full pairwise score tensor without any entity pair specific features which you can access here https://github.com/patverga/bran/blob/master/src/models/transformer.py#L468 . You can compute that tensor once and then aggregate scores for each of the entity pairs. This can be done efficiently using a gather/scatter but is not currently implemented.

@leebird
Copy link

leebird commented May 20, 2019

Hi,

In the above link, a few lines above, it seems e1_mask and e2_mask are not used in any way. How does the model know the locations of the tokens of the current entity pairs?

Thanks!

@leebird
Copy link

leebird commented May 20, 2019

Ah, never mind, just saw the ep_dist list.

@nefujiangping
Copy link

Ah, never mind, just saw the ep_dist list.

Did you know what exactly ep_dist_batch represents? I saw that ep_dist_batch is added to pairwise_scores in code (here) directly.

Thanks!

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

4 participants