class_docstr: Batch beam search implementation.
docstr: Score new hypothesis by `self.full_scorers`.
  
  Args:
      hyp (Hypothesis): Hypothesis with prefix tokens to score
      x (torch.Tensor): Corresponding input feature
      pre_x (torch.Tensor): Encoded speech feature for sequential attn (T, D)
          Sequential attn computes attn first on pre_x then on x,
          thereby attending to two sources in sequence.
  
  Returns:
      Tuple[Dict[str, torch.Tensor], Dict[str, Any]]: Tuple of
          score dict of `hyp` that has string keys of `self.full_scorers`
          and tensor score values of shape: `(self.n_vocab,)`,
          and state dict that has string keys
          and state values of `self.full_scorers`
docstr_tok: ["Score","new","hypothesis","by","`","self.full_scorers","`",".","Args",":","hyp","(","Hypothesis",")",":","Hypothesis","with","prefix","tokens","to","score","x","(","torch.Tensor",")",":","Corresponding","input","feature","pre_x","(","torch.Tensor",")",":","Encoded","speech","feature","for","sequential","attn","(","T",",","D",")","Sequential","attn","computes","attn","first","on","pre_x","then","on","x",",","thereby","attending","to","two","sources","in","sequence",".","Returns",":","Tuple","[","Dict","[","str",",","torch.Tensor","]",",","Dict","[","str",",","Any","]","]",":","Tuple","of","score","dict","of","`","hyp","`","that","has","string","keys","of","`","self.full_scorers","`","and","tensor","score","values","of","shape",":","`","(","self.n_vocab",",",")","`",",","and","state","dict","that","has","string","keys","and","state","values","of","`","self.full_scorers","`"]
code: def score_full(
      self,
      hyp: BatchHypothesis,
      x: torch.Tensor,
      pre_x: torch.Tensor = None,
  ) -> Tuple[Dict[str, torch.Tensor], Dict[str, Any]]:
      """Score new hypothesis by `self.full_scorers`.
  
      Args:
          hyp (Hypothesis): Hypothesis with prefix tokens to score
          x (torch.Tensor): Corresponding input feature
          pre_x (torch.Tensor): Encoded speech feature for sequential attn (T, D)
              Sequential attn computes attn first on pre_x then on x,
              thereby attending to two sources in sequence.
  
      Returns:
          Tuple[Dict[str, torch.Tensor], Dict[str, Any]]: Tuple of
              score dict of `hyp` that has string keys of `self.full_scorers`
              and tensor score values of shape: `(self.n_vocab,)`,
              and state dict that has string keys
              and state values of `self.full_scorers`
  
      """
      scores = dict()
      states = dict()
      for k, d in self.full_scorers.items():
          if "decoder" in k and self.return_hs:
              (scores[k], hs), states[k] = d.batch_score(
                  hyp.yseq, hyp.states[k], x, return_hs=self.return_hs
              )
          elif "decoder" in k and pre_x is not None:
              scores[k], states[k] = d.batch_score(
                  hyp.yseq, hyp.states[k], x, pre_x
              )
          else:
              scores[k], states[k] = d.batch_score(
                  hyp.yseq, hyp.states[k], x
              )
  
      if self.return_hs:
          return hs, scores, states
      return scores, states
  
imports: import logging
  from typing import Any, Dict, List, NamedTuple, Tuple
  import torch
  from packaging.version import parse
  from torch.nn.utils.rnn import pad_sequence
  from espnet.nets.beam_search import BeamSearch, Hypothesis
label_desc: Use image node_id 7 for calling the BatchBeamSearch obj's underlying member method code with example usage: obj.score_full(hyp, x, pre_x) and returns: scores,  states, hs,  scores,  states