def __init__(self, config, **kwargs):
    super().__init__(**kwargs)
    self.dense = tf.keras.layers.Dense(config.embedding_size, kernel_initializer=get_initializer(config.initializer_range), name='dense')
    if isinstance(config.hidden_act, str):
        self.transform_act_fn = get_tf_activation(config.hidden_act)
    else:
        self.transform_act_fn = config.hidden_act
    self.LayerNorm = tf.keras.layers.LayerNormalization(epsilon=config.layer_norm_eps, name='LayerNorm')
def __init__(self, config, **kwargs):
    super().__init__(**kwargs)
    self.dense = tf.keras.layers.Dense(config.embedding_size, kernel_initializer=get_initializer(config.initializer_range), name='dense')
    if isinstance(config.hidden_act, str):
        self.transform_act_fn = get_tf_activation(config.hidden_act)
    else:
        self.transform_act_fn = config.hidden_act
    self.LayerNorm = tf.keras.layers.LayerNormalization(epsilon=config.layer_norm_eps, name='LayerNorm')