def gaussian_lowpass(sigma: tf.Tensor, filter_size: int):
    """Generates gaussian windows centered in zero, of std sigma.

    Args:
      sigma: tf.Tensor<float>[1, 1, C, 1] for C filters.
      filter_size: length of the filter.

    Returns:
      A tf.Tensor<float>[1, filter_size, C, 1].
    """
    sigma = tf.clip_by_value(
        sigma, clip_value_min=(2. / filter_size), clip_value_max=0.5)
    t = tf.range(0, filter_size, dtype=tf.float32)
    t = tf.reshape(t, (1, filter_size, 1, 1))
    numerator = t - 0.5 * (filter_size - 1)
    denominator = sigma * 0.5 * (filter_size - 1)
    return tf.math.exp(-0.5 * (numerator / denominator) ** 2)
Generates gaussian windows centered in zero, of std sigma.

    Args:
      sigma: tf.Tensor<float>[1, 1, C, 1] for C filters.
      filter_size: length of the filter.

    Returns:
      A tf.Tensor<float>[1, filter_size, C, 1].
    
leaf_audio/impulse_responses.py