TimeAgnosticNet

class deepinv.models.TimeAgnosticNet(backbone_net: Module)[source]

Bases: Module, TimeMixin

Time-agnostic network wrapper.

Adapts a static image reconstruction network to process time-varying inputs. The image reconstruction network then processes the data independently frame-by-frame.

Flattens time dimension into batch dimension at input, and unflattens at output.


Example:

>>> from deepinv.models import UNet, TimeAgnosticNet
>>> model = UNet(scales=2)
>>> model = TimeAgnosticNet(model)
>>> y = rand(1, 1, 4, 8, 8) # B,C,T,H,W
>>> x_net = model(y, None)
>>> x_net.shape == y.shape
True
Parameters:
forward(y: Tensor, physics: Physics, **kwargs)[source]

Reconstructs a signal estimate from measurements y

Parameters:
  • y (Tensor) – measurements [B,C,T,H,W]

  • physics (deepinv.physics.Physics) – forward operator acting on dynamic inputs