(self, inps, training=None, mask=None)
return outs
Input shape: [batch_size, seq_enc_len, hidden_dim]
    Mask shape: [batch_size, seq_enc_len]
Input shape: [batch_size, seq_enc_len, hidden_dim]
    Mask shape: [batch_size, seq_enc_len]
Input shape : [ batch_size seq_enc_len hidden_dim ] Mask shape : [ batch_size seq_enc_len ]
def call(self, inps, training=None, mask=None):
    '''
    Input shape: [batch_size, seq_enc_len, hidden_dim]
    Mask shape: [batch_size, seq_enc_len]
    '''
    # Multi Head Attention
    inps = self.embed_dense(inps)
    self_attn_outs, _ = self.self_attn_layer((inps, inps, inps),
                                             training=training,
                                             mask=mask)
    self_attn_outs = self.self_attn_dropout(self_attn_outs, training=training)
    self_attn_outs += inps
    self_attn_outs = self.self_attn_norm(self_attn_outs)
    # Position Wise Feed Forward
    feed_forward_outs = self.feed_forward_layer(self_attn_outs)
    feed_forward_outs = self.feed_forward_dropout(
        feed_forward_outs, training=training)
    feed_forward_outs += self_attn_outs
    outs = self.feed_forward_norm(feed_forward_outs)
    return outs
def call ( self , inps , training = None , mask = None ) : # Multi Head Attention inps = self . embed_dense ( inps ) self_attn_outs , _ = self . self_attn_layer ( ( inps , inps , inps ) , training = training , mask = mask ) self_attn_outs = self . self_attn_dropout ( self_attn_outs , training = training ) self_attn_outs += inps self_attn_outs = self . self_attn_norm ( self_attn_outs ) # Position Wise Feed Forward feed_forward_outs = self . feed_forward_layer ( self_attn_outs ) feed_forward_outs = self . feed_forward_dropout ( feed_forward_outs , training = training ) feed_forward_outs += self_attn_outs outs = self . feed_forward_norm ( feed_forward_outs ) return outs