class_docstr: TransformerEncoderLayer is based on "Attention
  is all you Need" (https://arxiv.org/pdf/1706.03762.pdf).
class_docstr_tok: ["TransformerEncoderLayer","is","based","on","``","Attention","is","all","you","Need","''","(","https",":","\/\/arxiv.org\/pdf\/1706.03762.pdf",")","."]
docstr: Input: [dec_inps, enc_outs]
  Mask: [dec_mask, enc_mask]
  
  Input shape: [[batch_size, seq_dec_len, hidden_dim],
                  (batch_size, seq_enc_len, hidden_dim)]
  Mask shape: [(batch_size, seq_dec_len), (batch_size, seq_enc_len)]
docstr_tok: ["Input",":","[","dec_inps",",","enc_outs","]","Mask",":","[","dec_mask",",","enc_mask","]","Input","shape",":","[","[","batch_size",",","seq_dec_len",",","hidden_dim","]",",","(","batch_size",",","seq_enc_len",",","hidden_dim",")","]","Mask","shape",":","[","(","batch_size",",","seq_dec_len",")",",","(","batch_size",",","seq_enc_len",")","]"]
code: def call(self, inps, training=None, mask=None):
      """
      Input: [dec_inps, enc_outs]
      Mask: [dec_mask, enc_mask]
  
      Input shape: [[batch_size, seq_dec_len, hidden_dim],
                      (batch_size, seq_enc_len, hidden_dim)]
      Mask shape: [(batch_size, seq_dec_len), (batch_size, seq_enc_len)]
      """
      dec_inps, enc_outs = inps
      dec_inps = self.dec_embed_dense(dec_inps)
      enc_outs = self.enc_embed_dense(enc_outs)
      look_ahead_mask, enc_mask = mask
      # Self Attention
      self_attn_outs, _ = self.self_attn_layer(
          (dec_inps, dec_inps, dec_inps),
          training=training,
          mask=look_ahead_mask,
      )
      self_attn_outs = self.self_attn_dropout(
          self_attn_outs, training=training
      )
      self_attn_outs += dec_inps
      self_attn_outs = self.self_attn_norm(self_attn_outs)
  
      # Context Attention
      context_attn_outs, _ = self.context_attn_layer(
          (self_attn_outs, enc_outs, enc_outs),
          training=training,
          mask=enc_mask,
      )
      context_attn_outs = self.context_attn_dropout(
          context_attn_outs, training=training
      )
      context_attn_outs += self_attn_outs
      context_attn_outs = self.context_attn_norm(context_attn_outs)
  
      # Position Wise Feed Forward
      feed_forward_outs = self.feed_forward_layer(context_attn_outs)
      feed_forward_outs = self.feed_forward_dropout(
          feed_forward_outs, training=training
      )
      feed_forward_outs = context_attn_outs + feed_forward_outs
      outs = self.feed_forward_norm(feed_forward_outs)
  
      return outs
  
imports: import math
  from absl import logging
  import numpy
  import delta.compat
  from tensorflow.python.util import nest
  from delta.layers.base_layer import Layer
  from delta.layers import utils_tf
  import delta.layers
label_desc: Use image node_id 2 for calling the TransformerDecoderLayer obj's underlying member method code with example usage: obj.call(inps, training, mask) and returns: outs