LION.models.iterative_unrolled.cLPD¶
Classes
|
cLPD's dual block: a 1x1 convolution in, a neural ODE (first or second order), a 1x1 convolution out. |
|
cLPD's primal block: as |
|
The right-hand side of a first-order neural ODE: 3x3 convolutions through the |
|
The right-hand side of a second-order neural ODE: the state is (position, velocity) along the channels; the acceleration is a CNN of both. |
|
The initial velocity of a second-order neural ODE, from the initial position: convolutions of |
|
Solves the neural ODE |
|
Learned Primal Dual with continuous blocks (Runkel et al.): LPD whose primal and dual blocks are neural ODEs. |
- class LION.models.iterative_unrolled.cLPD.ContinuousDataProximal(layers, channels, tol=0.001, adjoint=True, do_secon_order=False, solver='rk4', instance_norm=False)[source]¶
Bases:
ModulecLPD’s dual block: a 1x1 convolution in, a neural ODE (first or second order), a 1x1 convolution out.
layersandchannels: asdataProximal’s;tol,adjointandsolver: the ODE’s (ODEBlock);do_secon_order: a second-order ODE;instance_norm: in the ODE’s convolutions.
- class LION.models.iterative_unrolled.cLPD.ContinuousRegProximal(layers, channels, tol=0.001, adjoint=False, do_secon_order=False, solver='rk4', instance_norm=False)[source]¶
Bases:
ModulecLPD’s primal block: as
ContinuousDataProximal, on the primal side.As
ContinuousDataProximal’s.
- class LION.models.iterative_unrolled.cLPD.ConvODEFunc(layers, channels, instance_norm=False)[source]¶
Bases:
ModuleThe right-hand side of a first-order neural ODE: 3x3 convolutions through the
channelslisted (with PReLUs, optional instance normalisation).Initialize internal Module state, shared by both nn.Module and ScriptModule.
- class LION.models.iterative_unrolled.cLPD.ConvSODEFunc(layers, channels, instance_norm=False)[source]¶
Bases:
ModuleThe right-hand side of a second-order neural ODE: the state is (position, velocity) along the channels; the acceleration is a CNN of both.
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- class LION.models.iterative_unrolled.cLPD.InitialVelocity(channels, instance_norm=False)[source]¶
Bases:
ModuleThe initial velocity of a second-order neural ODE, from the initial position: convolutions of
channelschannels.Initialize internal Module state, shared by both nn.Module and ScriptModule.
- class LION.models.iterative_unrolled.cLPD.ODEBlock(odefunc, tol=0.001, adjoint=False)[source]¶
Bases:
ModuleSolves the neural ODE
odefuncfrom time 0 to 1 (torchdiffeq).odefunc: the ODE’s right-hand side;tol: the solver’s relative and absolute tolerance;adjoint: gradients by the adjoint method (less memory) instead of through the solver.
- class LION.models.iterative_unrolled.cLPD.cLPD(operator_params, model_parameters=None)[source]¶
Bases:
LPDLearned Primal Dual with continuous blocks (Runkel et al.): LPD whose primal and dual blocks are neural ODEs.
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- static default_parameters()[source]¶
LPD’s parameters with 4-layer blocks, plus
do_secon_order(second-order ODE blocks; False).