def gabor_params_from_mels(self):
        """Retrieves center frequencies and standard deviations of gabor filters."""
        coeff = tf.math.sqrt(2. * tf.math.log(2.)) * self.n_fft
        sqrt_filters = tf.math.sqrt(self.mel_filters)
        center_frequencies = tf.cast(
            tf.argmax(sqrt_filters, axis=1), dtype=tf.float32)
        peaks = tf.reduce_max(sqrt_filters, axis=1, keepdims=True)
        half_magnitudes = peaks / 2.
        fwhms = tf.reduce_sum(
            tf.cast(sqrt_filters >= half_magnitudes, dtype=tf.float32), axis=1)
        return tf.stack(
            [center_frequencies * 2 * np.pi / self.n_fft, coeff / (np.pi * fwhms)],
            axis=1)
Retrieves center frequencies and standard deviations of gabor filters.
leaf_audio/melfilters.py