class_docstr: Base class for EncoderDecoder tests. Tests for specific classes should
  inherit from this and tf.test.TestCase.
code: def test_infer_beam_search(self):
      self.batch_size = 1
      beam_width = 10
      model, fetches_ = self._test_pipeline(
          mode=tf.contrib.learn.ModeKeys.INFER,
          params={"inference.beam_search.beam_width": 10},
      )
      (predictions_,) = fetches_
      pred_len = predictions_["predicted_ids"].shape[1]
  
      vocab_size = model.target_vocab_info.total_size
      np.testing.assert_array_equal(
          predictions_["predicted_ids"].shape, [1, pred_len, beam_width]
      )
      np.testing.assert_array_equal(
          predictions_["beam_search_output.beam_parent_ids"].shape,
          [1, pred_len, beam_width],
      )
      np.testing.assert_array_equal(
          predictions_["beam_search_output.scores"].shape,
          [1, pred_len, beam_width],
      )
      np.testing.assert_array_equal(
          predictions_[
              "beam_search_output.original_outputs.predicted_ids"
          ].shape,
          [1, pred_len, beam_width],
      )
      np.testing.assert_array_equal(
          predictions_[
              "beam_search_output.original_outputs.logits"
          ].shape,
          [1, pred_len, beam_width, vocab_size],
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from collections import namedtuple
  import yaml
  import numpy
  import tensorflow
  from seq2seq.data import vocab, input_pipeline
  from seq2seq.training import utils
  from seq2seq.test import utils
  from seq2seq.models import BasicSeq2Seq, AttentionSeq2Seq
label_desc: Use image node_id 8 for calling the EncoderDecoderTests obj's underlying member method code with example usage: obj.test_infer_beam_search() without return types