docstr: Rescore translations and combine weights to find top hypo tokens
docstr_tok: ["Rescore","translations","and","combine","weights","to","find","top","hypo","tokens"]
code: def combine_score(self, src_tokens, hypos, hypos_len, scores):
      """Rescore translations and combine weights to find top hypo tokens"""
      # Prepare all the weights and call combine weighted scores
      args = self.args
      weights = [
          args.l2r_model_weight,
          args.r2l_model_weight,
          args.reverse_model_weight,
          args.lm_model_weight,
          args.cloze_transformer_weight,
      ]
      bsz, src_len = src_tokens.size()
      hypos_len = hypos_len.type_as(scores)
      combined_scores = combine_weighted_scores(
          scores, weights, src_len, hypos_len, args.length_penalty
      )
      return combined_scores
  
file_path: translate/pytorch_translate/research/rescore/rescoring_criterion.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import math
  import torch
  from fairseq import utils
  from fairseq.criterions import LegacyFairseqCriterion, register_criterion
  from pytorch_translate import generate, utils
  from pytorch_translate.rescoring.model_scorers import SimpleModelScorer
  from pytorch_translate.rescoring.rescorer import add_args, combine_weighted_scores, Rescorer
label_desc: Use image node_id 5 for calling the RescoringCriterion obj's underlying member method code with example usage: obj.combine_score(src_tokens, hypos, hypos_len, scores) and returns: combined_scores