def __init__(self, depth: int = 6, dropout_rate: float = 0.2):
        """Initializes PANN model.

        Args:
          depth: the number of convolutional blocks. First block has 64 filters and
            the number of filters doubles at every block up to 2048 filters. A pool
            size of (2, 2) is used for the first 5 blocks and then (1, 1) to avoid
            negative output size.
          dropout_rate: the dropout rate.
        """
        super().__init__(name='pann')
        self.add(tf.keras.layers.BatchNormalization(axis=2))
        for block_idx in range(depth):
            filters = min(64 * (2 ** block_idx), 2048)
            pool_size = (2, 2) if block_idx < 5 else (1, 1)
            self.add(PANNConvBlock(
                filters=filters,
                pool_size=pool_size,
            ))
            self.add(tf.keras.layers.Dropout(dropout_rate))
Initializes PANN model.

        Args:
          depth: the number of convolutional blocks. First block has 64 filters and
            the number of filters doubles at every block up to 2048 filters. A pool
            size of (2, 2) is used for the first 5 blocks and then (1, 1) to avoid
            negative output size.
          dropout_rate: the dropout rate.
        
leaf_audio/models.py