class_docstr: Refer to [Hierarchical Attention Networks for Document Classification]
    (https://www.cs.cmu.edu/~hovy/papers/16HLT-hierarchical-attention-networks.pdf)
    wrap `with tf.variable_scope(name, reuse=tf.AUTO_REUSE):`
  Input shape: (Batch size, steps, features)
  Output shape: (Batch size, features)
class_docstr_tok: ["Refer","to","[","Hierarchical","Attention","Networks","for","Document","Classification","]","(","https",":","\/\/www.cs.cmu.edu\/~hovy\/papers\/16HLT-hierarchical-attention-networks.pdf",")","wrap","`","with","tf.variable_scope","(","name",",","reuse=tf.AUTO_REUSE",")",":","`","Input","shape",":","(","Batch","size",",","steps",",","features",")","Output","shape",":","(","Batch","size",",","features",")"]
code: def __init__(
      self,
      W_regularizer=None,
      u_regularizer=None,
      b_regularizer=None,
      W_constraint=None,
      u_constraint=None,
      b_constraint=None,
      use_bias=True,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.supports_masking = True
      self.init = tf.keras.initializers.get("glorot_uniform")
  
      self.W_regularizer = tf.keras.regularizers.get(W_regularizer)
      self.u_regularizer = tf.keras.regularizers.get(u_regularizer)
      self.b_regularizer = tf.keras.regularizers.get(b_regularizer)
  
      self.W_constraint = tf.keras.constraints.get(W_constraint)
      self.u_constraint = tf.keras.constraints.get(u_constraint)
      self.b_constraint = tf.keras.constraints.get(b_constraint)
  
      self.use_bias = use_bias
  
file_path: delta/delta/layers/attention.py
imports: from absl import logging
  import delta.compat
  from delta.layers.base_layer import Layer
label_desc: Use image node_id 1 to create a new HanAttention object from inherited base classes: Layer with example: obj = HanAttention(W_regularizer, u_regularizer, b_regularizer, W_constraint, u_constraint, b_constraint, use_bias)