class_docstr: Rescores source and target tokens based on a model
docstr: calculate scores for arbitrary hypos given encoder_inputs
  input:
      hypos: a tensor of length bsz*beam_size
  output:
      hypos_scores: \sum log prob over the entire hypo
      encoder_outs: hidden vectors from encoder
                    (e.g., used to stabilize rl training)
      logprobs: log prob over all time-steps
                (e.g., used for word-level rl training)
docstr_tok: ["calculate","scores","for","arbitrary","hypos","given","encoder_inputs","input",":","hypos",":","a","tensor","of","length","bsz","*","beam_size","output",":","hypos_scores",":","\\sum","log","prob","over","the","entire","hypo","encoder_outs",":","hidden","vectors","from","encoder","(","e.g.",",","used","to","stabilize","rl","training",")","logprobs",":","log","prob","over","all","time-steps","(","e.g.",",","used","for","word-level","rl","training",")"]
code: def score_tokens(self, encoder_inputs, hypos):
      """calculate scores for arbitrary hypos given encoder_inputs
      input:
          hypos: a tensor of length bsz*beam_size
      output:
          hypos_scores: \sum log prob over the entire hypo
          encoder_outs: hidden vectors from encoder
                        (e.g., used to stabilize rl training)
          logprobs: log prob over all time-steps
                    (e.g., used for word-level rl training)
      """
      encoder_outs = self.encode(encoder_inputs)
      logprobs, possible_translation_tokens = self.decode(
          self.args, self.model, encoder_outs, hypos
      )
      hypos_scores = self.compute_scores(
          hypos, logprobs, possible_translation_tokens
      )
      return hypos_scores, encoder_outs, logprobs
  
imports: import torch
  from pytorch_translate import utils
label_desc: Use image node_id 7 for calling the SimpleModelScorer obj's underlying member method code with example usage: obj.score_tokens(encoder_inputs, hypos) and returns: hypos_scores,  encoder_outs,  logprobs