def __init__(self,
                 num_outputs: int,
                 frontend: Optional[tf.keras.Model] = None,
                 encoder: Optional[tf.keras.Model] = None):
        """Initialization.

        Args:
          num_outputs: the number of classes of the classification problem.
          frontend: A keras model that takes a waveform and outputs a time-frequency
            representation.
          encoder: An encoder to turn the time-frequency representation into an
            embedding.
        """
        super().__init__()
        self._frontend = frontend
        self._encoder = encoder
        self._pool = tf.keras.Sequential([
            tf.keras.layers.GlobalMaxPooling2D(),
            tf.keras.layers.Flatten(),
        ])
        self._head = tf.keras.layers.Dense(num_outputs, activation=None)
Initialization.

        Args:
          num_outputs: the number of classes of the classification problem.
          frontend: A keras model that takes a waveform and outputs a time-frequency
            representation.
          encoder: An encoder to turn the time-frequency representation into an
            embedding.
        
leaf_audio/models.py