class_docstr: Beam search implementation.
docstr: Get an initial hypothesis data.
  
  Args:
      x (torch.Tensor): The encoder output feature
  
  Returns:
      Hypothesis: The initial hypothesis.
docstr_tok: ["Get","an","initial","hypothesis","data",".","Args",":","x","(","torch.Tensor",")",":","The","encoder","output","feature","Returns",":","Hypothesis",":","The","initial","hypothesis","."]
code: def init_hyp(self, x: torch.Tensor) -> List[Hypothesis]:
      """Get an initial hypothesis data.
  
      Args:
          x (torch.Tensor): The encoder output feature
  
      Returns:
          Hypothesis: The initial hypothesis.
  
      """
      init_states = dict()
      init_scores = dict()
      for k, d in self.scorers.items():
          init_states[k] = d.init_state(x)
          init_scores[k] = 0.0
  
      # NOTE (Shih-Lun): added for OpenAI Whisper ASR
      primer = (
          [self.sos] if self.hyp_primer is None else self.hyp_primer
      )
  
      return [
          Hypothesis(
              score=0.0,
              scores=init_scores,
              states=init_states,
              hs=[],
              yseq=torch.tensor(primer, device=x.device),
          )
      ]
  
imports: import logging
  from itertools import chain
  from typing import Any, Dict, List, NamedTuple, Tuple, Union
  import torch
  from espnet.nets.e2e_asr_common import end_detect
  from espnet.nets.scorer_interface import PartialScorerInterface, ScorerInterface
label_desc: Use image node_id 3 for calling the BeamSearch obj's underlying member method code with example usage: obj.init_hyp(x) and returns: list