class_docstr: TODO: implement forward_attention
  TODO: location sensitive attention
  TODO: implement attention windowing 
class_docstr_tok: ["TODO",":","implement","forward_attention","TODO",":","location","sensitive","attention","TODO",":","implement","attention","windowing"]
code: def __init__(
      self,
      attn_dim,
      use_loc_attn,
      loc_attn_n_filters,
      loc_attn_kernel_size,
      use_windowing,
      norm,
      use_forward_attn,
      use_trans_agent,
      use_forward_attn_mask,
      **kwargs,
  ):
      super(Attention, self).__init__(**kwargs)
      self.use_loc_attn = use_loc_attn
      self.loc_attn_n_filters = loc_attn_n_filters
      self.loc_attn_kernel_size = loc_attn_kernel_size
      self.use_windowing = use_windowing
      self.norm = norm
      self.use_forward_attn = use_forward_attn
      self.use_trans_agent = use_trans_agent
      self.use_forward_attn_mask = use_forward_attn_mask
      self.query_layer = tf.keras.layers.Dense(
          attn_dim, use_bias=False, name="query_layer/linear_layer"
      )
      self.inputs_layer = tf.keras.layers.Dense(
          attn_dim,
          use_bias=False,
          name=f"{self.name}/inputs_layer/linear_layer",
      )
      self.v = tf.keras.layers.Dense(
          1, use_bias=True, name="v/linear_layer"
      )
      if use_loc_attn:
          self.location_conv1d = keras.layers.Conv1D(
              filters=loc_attn_n_filters,
              kernel_size=loc_attn_kernel_size,
              padding="same",
              use_bias=False,
              name="location_layer/location_conv1d",
          )
          self.location_dense = keras.layers.Dense(
              attn_dim,
              use_bias=False,
              name="location_layer/location_dense",
          )
      if norm == "softmax":
          self.norm_func = tf.nn.softmax
      elif norm == "sigmoid":
          self.norm_func = _sigmoid_norm
      else:
          raise ValueError("Unknown value for attention norm type")
  
imports: import tensorflow
  from tensorflow import keras
  from tensorflow.python.ops import math_ops
label_desc: Use image node_id 1 to create a new Attention object from inherited base classes: keras.layers with example: obj = Attention(attn_dim, use_loc_attn, loc_attn_n_filters, loc_attn_kernel_size, use_windowing, norm, use_forward_attn, use_trans_agent, use_forward_attn_mask)