class_docstr: Tests :class:`~texar.tf.modules.TransformerDecoder`
      
class_docstr_tok: ["Tests",":","class",":","`","~texar.tf.modules.TransformerDecoder","`"]
docstr: Tests train_greedy
          
docstr_tok: ["Tests","train_greedy"]
code: def test_decode_train(self):
      """Tests train_greedy"""
      decoder = TransformerDecoder(
          vocab_size=self._vocab_size, output_layer=self._output_layer
      )
      # 6 blocks
      # -self multihead_attention: 4 dense without bias + 2 layer norm vars
      # -encdec multihead_attention: 4 dense without bias + 2 layer norm vars
      # -poswise_network: Dense with bias, Dense with bias + 2 layer norm vars
      # 2 layer norm vars
      outputs = decoder(
          memory=self._memory,
          memory_sequence_length=self._memory_sequence_length,
          memory_attention_bias=None,
          inputs=self._inputs,
          decoding_strategy="train_greedy",
          mode=tf.estimator.ModeKeys.TRAIN,
      )
      self.assertEqual(len(decoder.trainable_variables), 110)
      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 3 for calling the TransformerDecoderTest obj's underlying member method code with example usage: obj.test_decode_train() without return types