Skip to content

[Question] How the answers are aggregated (from different documents) ? #2744

Discussion options

You must be logged in to vote

Hi @gabinguo in this context I would like to quote the famous saying "A line of code is worth a thousand words." 😉 So I would recommend that you go through the lines of code in the logits_to_preds method of the QuestionAnsweringHead here:

# get scores for all combinations of start and end logits => candidate answers

The other method you want to look at is aggregate_preds:

def aggregate_preds(self, preds, passage_start_t, ids, seq_2_start_t=None, labels=None):

In short, softmax is calculated only for all answers …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gabinguo
Comment options

@ghost
Comment options

Answer selected by gabinguo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants