class_docstr: Batch 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) -> BatchHypothesis:
      """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.batch_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 self.batchfy(
          [
              Hypothesis(
                  score=0.0,
                  scores=init_scores,
                  states=init_states,
                  hs=[],
                  yseq=torch.tensor(primer, device=x.device),
              )
          ]
      )
  
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 6 for calling the BatchBeamSearch obj's underlying member method code with example usage: obj.init_hyp(x) and returns: self