(self, x)
return output + x
Layer definition.

        Args:
            input: [ batch_size, input_len, model_dim ]


        Returns:
            output: [ batch_size, input_len, model_dim ]
Layer definition.
Layer definition .
def forward(self, x):
        """
        Layer definition.

        Args:
            input: [ batch_size, input_len, model_dim ]


        Returns:
            output: [ batch_size, input_len, model_dim ]
        """
        inter = self.dropout_1(self.relu(self.w_1(self.layer_norm(x))))
        output = self.dropout_2(self.w_2(inter))
        return output + x
def forward ( self , x ) : inter = self . dropout_1 ( self . relu ( self . w_1 ( self . layer_norm ( x ) ) ) ) output = self . dropout_2 ( self . w_2 ( inter ) ) return output + x