code: def __init__(
      self,
      d_model_size,
      num_heads,
      dff,
      rate=0.1,
      layer_norm_epsilon=1e-6,
      output_attentions=False,
      **kwargs,
  ):
      super().__init__(**kwargs)
  
      self.output_attentions = output_attentions
  
      self.multi_head_attention = TFMultiHeadAttention(
          d_model_size,
          num_heads,
          output_attentions=self.output_attentions,
          name="multi_head_attention",
      )
      self.ffn = TFPointWiseFeedForwardLayer(
          d_model_size, dff, name="ffn"
      )
  
      self.layernorm1 = tf.keras.layers.LayerNormalization(
          epsilon=layer_norm_epsilon, name="layernorm1"
      )
      self.layernorm2 = tf.keras.layers.LayerNormalization(
          epsilon=layer_norm_epsilon, name="layernorm2"
      )
  
      self.dropout1 = tf.keras.layers.Dropout(rate)
      self.dropout2 = tf.keras.layers.Dropout(rate)
  
imports: import warnings
  from typing import Optional, Tuple, Union
  import numpy
  import tensorflow
  from ...modeling_tf_outputs import TFBaseModelOutputWithPast, TFCausalLMOutputWithPast, TFSequenceClassifierOutput
  from ...modeling_tf_utils import TFCausalLanguageModelingLoss, TFModelInputType, TFPreTrainedModel, TFSequenceClassificationLoss, TFSharedEmbeddings, get_initializer, keras_serializable, unpack_inputs
  from ...tf_utils import shape_list, stable_softmax
  from ...utils import add_code_sample_docstrings, add_start_docstrings, add_start_docstrings_to_model_forward, logging
  from .configuration_ctrl import CTRLConfig
label_desc: Use image node_id 1 to create a new TFEncoderLayer object from inherited base classes: tf.keras.layers with example: obj = TFEncoderLayer(d_model_size, num_heads, dff, rate, layer_norm_epsilon, output_attentions)