class_docstr: Decodes the output of Beam Search to get the top hypotheses
class_docstr_tok: ["Decodes","the","output","of","Beam","Search","to","get","the","top","hypotheses"]
code: def __init__(
      self, eos_token_id, length_penalty, nbest, beam_size, stop_at_eos
  ):
      super().__init__()
      self.eos_token_id: int = eos_token_id
      self.length_penalty: float = length_penalty
      self.nbest: int = nbest
      self.beam_size: int = beam_size
      self.stop_at_eos: bool = stop_at_eos
  
file_path: pytext/pytext/torchscript/seq2seq/beam_decode.py
imports: from typing import List, Tuple
  import torch
  from torch import Tensor
label_desc: Use image node_id 1 to create a new BeamDecode object from inherited base classes: torch.nn with example: obj = BeamDecode(eos_token_id, length_penalty, nbest, beam_size, stop_at_eos)