class_docstr: Tests :class:`~texar.tf.modules.TransformerDecoder`
      
class_docstr_tok: ["Tests",":","class",":","`","~texar.tf.modules.TransformerDecoder","`"]
docstr: Tests infer_sample
          
docstr_tok: ["Tests","infer_sample"]
code: def test_decode_infer_sample(self):
      """Tests infer_sample"""
      decoder = TransformerDecoder(
          vocab_size=self._vocab_size, output_layer=self._output_layer
      )
      helper = tx_helper.SampleEmbeddingHelper(
          self._embedding_fn, self._start_tokens, self._end_token
      )
  
      outputs, length = decoder(
          memory=self._memory,
          memory_sequence_length=self._memory_sequence_length,
          memory_attention_bias=None,
          inputs=None,
          helper=helper,
          max_decoding_length=self._max_decode_len,
          mode=tf.estimator.ModeKeys.PREDICT,
      )
      with self.test_session() as sess:
          sess.run(tf.global_variables_initializer())
          outputs_ = sess.run(outputs)
          self.assertIsInstance(outputs_, TransformerDecoderOutput)
  
file_path: texar/tests/modules/decoders/transformer_decoders_test.py
imports: import tensorflow
  from texar.tf.modules.decoders.transformer_decoders import TransformerDecoder
  from texar.tf.modules.decoders.transformer_decoders import TransformerDecoderOutput
  from texar.tf.modules.decoders import tf_helpers
label_desc: Use image node_id 6 for calling the TransformerDecoderTest obj's underlying member method code with example usage: obj.test_decode_infer_sample() without return types