@staticmethod
def compute_many(guess: torch.Tensor, answers: torch.Tensor, pad_idx, end_idx, unk_idx):
    '\n        Return BLEU-1..4 using fairseq and tokens.\n        '
    if (fairseqbleu is None):
        return None
    scorer = fairseqbleu.Scorer(pad_idx, end_idx, unk_idx)
    answers = answers.cpu().int()
    guess = guess.cpu().int()
    scorer.add(answers, guess)
    return [FairseqBleuMetric((scorer.score(i) / 100.0)) for i in range(1, 5)]
Return BLEU-1..4 using fairseq and tokens.
@staticmethod
def compute_many(guess: torch.Tensor, answers: torch.Tensor, pad_idx, end_idx, unk_idx):
    '\n        \n        '
    if (fairseqbleu is None):
        return None
    scorer = fairseqbleu.Scorer(pad_idx, end_idx, unk_idx)
    answers = answers.cpu().int()
    guess = guess.cpu().int()
    scorer.add(answers, guess)
    return [FairseqBleuMetric((scorer.score(i) / 100.0)) for i in range(1, 5)]