def __init__(self,
               *,
               hidden_size,
               use_batch_norm,
               dropout,
               n_classes,
               activation,
               name = 'bilinear_matcher',
               **kwargs):
    """Build a bilinear matcher.

    Args:
      hidden_size: hidden size of bilinear layer
      use_batch_norm: whether to use batch norm before activation
      dropout: dropout rate
      n_classes: Number of logits/probs to output from final layer
      activation: Activation function or name of activation function
      name: Name of this module
      **kwargs: Forwarded to inherited layers
    """
    super().__init__(name=name, **kwargs)
    self._hidden_size = hidden_size
    self._n_classes = n_classes
    self._use_batch_norm = use_batch_norm
    self._dropout = dropout
    self._activation = activation
    self._matcher = tf.keras.Sequential(name='matcher_sequential')
    self._matcher.add(Bilinear(hidden_size, name='bilinear'))
    if use_batch_norm:
      self._matcher.add(tf.keras.layers.BatchNormalization())
    self._matcher.add(tf.keras.layers.Activation(activation))
    self._matcher.add(tf.keras.layers.Dropout(dropout))
    self._matcher.add(tf.keras.layers.Dense(n_classes))
Build a bilinear matcher.

    Args:
      hidden_size: hidden size of bilinear layer
      use_batch_norm: whether to use batch norm before activation
      dropout: dropout rate
      n_classes: Number of logits/probs to output from final layer
      activation: Activation function or name of activation function
      name: Name of this module
      **kwargs: Forwarded to inherited layers
    
language/serene/layers.py