code: def __init__(
      self, d_model_size, num_heads, output_attentions=False, **kwargs
  ):
      super().__init__(**kwargs)
      self.num_heads = num_heads
      self.d_model_size = d_model_size
      self.output_attentions = output_attentions
  
      self.depth = int(d_model_size / self.num_heads)
  
      self.Wq = tf.keras.layers.Dense(d_model_size, name="Wq")
      self.Wk = tf.keras.layers.Dense(d_model_size, name="Wk")
      self.Wv = tf.keras.layers.Dense(d_model_size, name="Wv")
  
      self.dense = tf.keras.layers.Dense(d_model_size, name="dense")
  
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 TFMultiHeadAttention object from inherited base classes: tf.keras.layers with example: obj = TFMultiHeadAttention(d_model_size, num_heads, output_attentions)