LION.models.post_processing.cFBPConvNet¶
Classes
|
The right-hand side of a first-order neural ODE: convolutions through the |
|
The right-hand side of a second-order neural ODE: the state is (position, velocity) along the channels. |
|
Downscaling with maxpool |
|
The initial velocity of a second-order neural ODE, from the initial position. |
|
Solves the neural ODE |
|
Upscaling with transpose conv |
|
Continuous FBPConvNet: FBPConvNet with every convolution block replaced by a neural ODE block. |
- class LION.models.post_processing.cFBPConvNet.ConvODEFunc(channels, relu_type='ReLU', relu_last=True, kernel_size=3)[source]¶
Bases:
ModuleThe right-hand side of a first-order neural ODE: convolutions through the
channelslisted, with batch normalisation andrelu_type.Initialize internal Module state, shared by both nn.Module and ScriptModule.
- class LION.models.post_processing.cFBPConvNet.ConvSODEFunc(channels, relu_type='ReLU', relu_last=True, kernel_size=3)[source]¶
Bases:
ModuleThe right-hand side of a second-order neural ODE: the state is (position, velocity) along the channels.
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- class LION.models.post_processing.cFBPConvNet.Down[source]¶
Bases:
ModuleDownscaling with maxpool
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- class LION.models.post_processing.cFBPConvNet.InitialVelocity(channels)[source]¶
Bases:
ModuleThe initial velocity of a second-order neural ODE, from the initial position.
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- class LION.models.post_processing.cFBPConvNet.ODEBlock(odefunc, tol=0.001, adjoint=False, solver='rk4')[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);solver: a torchdiffeq method.
- class LION.models.post_processing.cFBPConvNet.Up(channels, stride=2, relu_type='ReLU')[source]¶
Bases:
ModuleUpscaling with transpose conv
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- class LION.models.post_processing.cFBPConvNet.cFBPConvNet(operator_params=None, model_parameters=None)[source]¶
Bases:
LIONmodelContinuous FBPConvNet: FBPConvNet with every convolution block replaced by a neural ODE block. Takes the FDK reconstruction as input (IMAGE) and returns input + residual, like FBPConvNetImage.
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- static default_parameters()[source]¶
FBPConvNet’s channels, each block a neural ODE (its input lifted by a 1x1 convolution), and the ODEs’ settings:
tol: the solver’s tolerance (1e-3);ode_adjoint: gradients by the adjoint method (False);do_second_order: second-order ODEs (False; not implemented yet);solver: a torchdiffeq method (“rk4”).