spyrit.core.recon.PinvNet.reconstruct_pinv

PinvNet.reconstruct_pinv(y)[source]

Reconstructs measurement vectors without denoising.

This method applies the prep and pinv modules of the reconstruction network to the input measurement vectors. It is somewhat equivalent to the reconstruct() method, but without the denoising step (it is strictly equivalent if no additional reconstruction modules have been user-added to the network).

Note

This method may differ significantly from the reconstruct() if more reconstruction modules have been user-added to the network.

Args:

y (torch.tensor): Input measurement tensor. Its shape depends on the preprocessing operator input shape.

Returns:

torch.tensor: Output tensor. Its shape depends on the output of the reconstruction modules.

Example:
>>> import spyrit
>>> acqu = spyrit.core.meas.HadamSplit2d(32)
>>> prep = spyrit.core.prep.Rescale(1.0)
>>> pinv = PinvNet(acqu, prep, device=torch.device("cpu"))
>>> x = torch.rand(10, 1, 32, 32)
>>> y = pinv.acquire(x)
>>> z = pinv.reconstruct_pinv(y)
>>> print(z.shape)
torch.Size([10, 1, 32, 32])