xnn.cnn.models.base.low_pass_filter#
- xnn.cnn.models.base.low_pass_filter(x, scale, stride=1)[source]#
Gaussian blur of the spatial axes, optionally followed by a stride.
The anti-aliasing filter of Sec. 4.4.2: a downsampling by
scaleis preceded by a Gaussian of standard deviation0.5 sqrt(scale^2 - 1)voxels (the width that turns the voxel-sized sampling kernel into one ofscalevoxels), truncated at 2.5 standard deviations and normalized to unit sum. Applied channel by channel, so it commutes with every fiber transformation and preserves equivariance. The Gaussian is separable, so the zero-padded, strided 3D convolution is applied as one banded matrix per axis.- Parameters:
- Returns:
The filtered fields,
(..., X', Y', Z').- Return type:
Tensor