freqfilter_init
#
- hypercoil.init.freqfilter.freqfilter_init(*, shape: Tuple[int, ...], filter_specs: Sequence[FreqFilterSpec], key: PRNGKey) Tensor [source]#
Filter transfer function initialisation.
Initialise a tensor such that its values follow or approximate the transfer function of a specified filter.
Danger
Note that this provides only an emulation for IIR filters. Thus, for instance, using the
butterworth
filter initialisation will not in any sense initialise a Butterworth filter. It will return a spectrum that approximately emulates the action of a Butterworth filter in the frequency domain. In practice, the results are not even close to a true IIR filter. For a true differentiable IIR filter, use the IIRFilter class instead (when it’s operational).- Dimension:
tensor : \((*, F, N)\) F denotes the total number of filters to initialise from the provided specs, and N denotes the number of frequency bins.
- Parameters:
- shapeTuple[int, …]
Shape of the tensor to initialise.
- filter_specslist(FreqFilterSpec)
A list of filter specifications implemented as
FreqFilterSpec
objects.
- Returns:
- Tensor
A tensor of shape
shape
containing the transfer functions of the specified filters.