Kaiser FIR Filter
Kaiser FIR Filter¤
neojax.nn.kaiser_fir_filter.KaiserFIRFilter
¤
FIR Filter with Kaiser window.
Computes
where \(w_K(x)\) is the window function, \(f_c\) the cutoff frequency
and \(h_K(x)\) is the practical approximation of \(\psi(x)\),
the ideal continuous-time low-pass filter
(as in appendix C of StyleGAN3 and scipy.signal.firwin).
Part of the filtered leaky ReLU of the CNO.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cutoff_freq
|
float | int
|
Cutoff frequency \(f_c\) (same unit as |
required |
num_taps
|
int
|
Discrete spatial locations, i.e. taps, where the filter
is defined. Default is |
12
|
half_band_width
|
float | int
|
Half-width of the transition band, i.e. \(f_h\). Same as
|
0.8
|
sampling_fac
|
int
|
Up-/ and downsampling factor. Multiplication factor for
|
2
|
sampling_freq
|
float | int
|
The sampling frequency or rate \(s\)/\(f_s\). Default is 2. |
2.0
|
normalize
|
bool
|
Whether to normalize the filter, i.e. enforce \(\sum_i h_{K}\left[i\right] = 1\).
Default is |
True
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Internal Attributes
These fields store the internal layer states.
- _filter (
tuple[float, ...]): The filter stencil.
Cite
Alias-Free Generative Adversarial Networks
@inproceedings{Karras2021,
author = {Tero Karras and Miika Aittala and
Samuli Laine and Erik H\"ark\"onen and
Janne Hellsten and Jaakko Lehtinen and Timo Aila},
title = {Alias-Free Generative Adversarial Networks},
booktitle = {Proc. NeurIPS},
year = {2021}
}
filter
property
¤
Assembled static filter stencil tuple with shape (num_taps,).