(self, src, src_mask=None, training=None)
return out
Pass the input through the endocder layer.

        Args:
            src: the sequnce to the encoder layer (required).
            mask: the mask for the src sequence (optional).

        Shape:
            see the docs in Transformer class.
Pass the input through the endocder layer.
Pass the input through the endocder layer .
def call(self, src, src_mask=None, training=None):
    """Pass the input through the endocder layer.

        Args:
            src: the sequnce to the encoder layer (required).
            mask: the mask for the src sequence (optional).

        Shape:
            see the docs in Transformer class.
        """
    out = self.self_attn(src, src, src, mask=src_mask)[0]
    out = self.norm1(src + self.dropout(out, training=training))
    out = self.norm2(out + self.ffn(out, training=training))

    return out
def call ( self , src , src_mask = None , training = None ) : out = self . self_attn ( src , src , src , mask = src_mask ) [ 0 ] out = self . norm1 ( src + self . dropout ( out , training = training ) ) out = self . norm2 ( out + self . ffn ( out , training = training ) ) return out