TimeAgnosticNet
- class deepinv.models.TimeAgnosticNet(backbone_net: Module)[source]
-
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:
backbone_net (torch.nn.Module) – Base network which can only take static inputs (B,C,H,W)
device (torch.device) – cpu or gpu.
- 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