class_docstr: Tests :class:`~texar.tf.modules.TransformerDecoder`
      
class_docstr_tok: ["Tests",":","class",":","`","~texar.tf.modules.TransformerDecoder","`"]
code: def test_output_layer(self):
      decoder = TransformerDecoder(
          vocab_size=self._vocab_size, output_layer=None
      )
      self.assertIsInstance(decoder, TransformerDecoder)
  
      decoder = TransformerDecoder(output_layer=tf.identity)
      self.assertIsInstance(decoder, TransformerDecoder)
  
      tensor = tf.random_uniform(
          [self._emb_dim, self._vocab_size], maxval=1, dtype=tf.float32
      )
      decoder = TransformerDecoder(output_layer=tensor)
      self.assertIsInstance(decoder, TransformerDecoder)
      self.assertEqual(decoder.vocab_size, self._vocab_size)
  
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 2 for calling the TransformerDecoderTest obj's underlying member method code with example usage: obj.test_output_layer() without return types