neuralop.layers.spectral_convolution.SpectralConv2d

class neuralop.layers.spectral_convolution.SpectralConv2d(in_channels, out_channels, n_modes, complex_data=False, max_n_modes=None, bias=True, separable=False, resolution_scaling_factor: int | float | List[float | int] | None = None, fno_block_precision='full', rank=0.5, factorization=None, implementation='reconstructed', fixed_rank_modes=False, decomposition_kwargs: dict | None = None, init_std='auto', fft_norm='forward', device=None)[source]

2D Spectral Conv, see neuralop.layers.SpectraConv for the general case

This is provided for reference only, see neuralop.layers.SpectraConv for the preferred, general implementation

Methods

forward(x)

Generic forward pass for the Factorized Spectral Conv

forward(x)[source]

Generic forward pass for the Factorized Spectral Conv

Parameters:
xtorch.Tensor

input activation of size (batch_size, channels, d1, …, dN)

Returns:
tensorized_spectral_conv(x)