alpine.models.nonlin package#
Submodules#
alpine.models.nonlin.nonlin module#
- class alpine.models.nonlin.nonlin.Gauss#
Bases:
Module
Gaussian 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
Module
instance 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:
Module
HOSC 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
Module
instance 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:
Module
- __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
Module
instance 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:
Module
Sinc 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
Module
instance 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:
Module
Sine 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
Module
instance 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:
Module
Wavelet 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
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.