(self, config, variance_epsilon=1e-12)
Construct a layernorm module in the TF style (epsilon inside the square root).
Construct a layernorm module in the TF style (epsilon inside the square root).
Construct a layernorm module in the TF style ( epsilon inside the square root ) .
def __init__(self, config, variance_epsilon=1e-12):
        """Construct a layernorm module in the TF style (epsilon inside the square root).
        """
        super(BERTLayerNorm, self).__init__()
        self.gamma = nn.Parameter(torch.ones(config.hidden_size))
        self.beta = nn.Parameter(torch.zeros(config.hidden_size))
        self.variance_epsilon = variance_epsilon
def __init__ ( self , config , variance_epsilon = 1e-12 ) : super ( BERTLayerNorm , self ) . __init__ ( ) self . gamma = nn . Parameter ( torch . ones ( config . hidden_size ) ) self . beta = nn . Parameter ( torch . zeros ( config . hidden_size ) ) self . variance_epsilon = variance_epsilon