Defining New Operators#
Defining a new forward operator is relatively simple. You need to create a new class that inherits from the right
physics class, that is deepinv.physics.Physics()
for non-linear operators,
deepinv.physics.LinearPhysics()
for linear operators and deepinv.physics.DecomposablePhysics()
for linear operators with a closed-form singular value decomposition. The only requirement is to define
a deepinv.physics.Physics.A
method that computes the forward operator.
See the example Creating a forward operator. for more details.
Tip
Defining a new linear operator requires the definition of deepinv.physics.LinearPhysics.A_adjoint
,
you can define the adjoint automatically using autograd with deepinv.physics.adjoint_function
.
Note however that coding a closed form adjoint is generally more efficient.
Tip
You can also inherit from mixin classes such as deepinv.physics.TimeMixin
and deepinv.physics.MRIMixin
to provide useful methods for your physics.