alpine.models.nonlin package#
Submodules#
alpine.models.nonlin.nonlin module#
- class alpine.models.nonlin.nonlin.Gauss#
Bases:
NonlinearGaussian nonlinearity proposed by [Ramasinghe and Lucey, 2022].
- __init__(scale=1.0, name='gauss')#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(x)#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class alpine.models.nonlin.nonlin.HOSC#
Bases:
NonlinearHOSC nonlinearity proposed by [Serrano et al., 2024]
- __init__(beta, name='hosc')#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(x)#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class alpine.models.nonlin.nonlin.Nonlinear#
Bases:
ModuleBase class for activation functions that can be tracked using the FeatureExtractor context manager.
- __init__(name: str)#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(x)#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class alpine.models.nonlin.nonlin.ReLU#
Bases:
Nonlinear- __init__(name='relu')#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(x)#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class alpine.models.nonlin.nonlin.Sinc#
Bases:
NonlinearSinc nonlinearity proposed by :cite:``.
- __init__(omega=30.0, name='sinc')#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(x)#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class alpine.models.nonlin.nonlin.Sine#
Bases:
NonlinearSine nonlinearity proposed by [Sitzmann et al., 2020]
- __init__(omega=30.0, name='sine')#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(x)#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class alpine.models.nonlin.nonlin.Wavelet#
Bases:
NonlinearWavelet nonlinearty proposed by [Saragadam et al., 2022]
- __init__(sigma=1.0, omega=30.0, trainable=False, name='wavelet')#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(x)#
Define the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.