class_docstr: Beam search for Encoder-Decoder models.
  
  Arguments:
      seq2seq (Object): Seq2Seq container object with a trained model to use for inference
code: def __init__(self, seq2seq):
      super(BeamSearch, self).__init__(name=None)
  
      self.layers = seq2seq
  
      self.hasLUT = seq2seq.hasLUT
  
      # resize buffers
      new_steps = 1
      seq2seq.decoder.switch_mode(inference=True)
      self.z_shape = (
          new_steps
          if self.hasLUT
          else (seq2seq.out_shape[0], new_steps)
      )
  
file_path: neon/neon/util/beamsearch.py
imports: import numpy
  from neon import NervanaObject
  import logging
label_desc: Use image node_id 1 to create a new BeamSearch object from inherited base classes: NervanaObject with example: obj = BeamSearch(seq2seq)