spyrit.core.recon.PinvNet.reconstruct
- PinvNet.reconstruct(y)
Apply the reconstruction modules to the input measurements.
The signal is reconstructed using the reconstruction modules stored in the network under the key recon_modules. They are all successively applied to the input tensor y.
- Args:
y (torch.tensor): Input measurement tensor. It usually has measurements in the last dimension.
- Returns:
torch.tensor: Output tensor. Its shape depends on the output of the reconstruction modules.
- Example:
# >>> acqu1 = lambda x: x*2 # >>> acqu2 = lambda x: x - 10 # >>> acqu = nn.Sequential(acqu1, acqu2) # >>> recon1 = lambda x: (x + 10) / 2 # >>> recon = nn.Sequential(recon1) # >>> net = FullNet(acqu, recon) # >>> y = torch.tensor(0.0) # >>> z = net.reconstruct(y) # >>> print(z) tensor(5.0000)