spyrit.core.recon.PseudoInverse.forward
- PseudoInverse.forward(x: tensor, meas_op: Linear | DynamicLinear, **kwargs) tensor[source]
Computes pseudo-inverse of measurements.
- Args:
x: Batch of measurement vectors.meas_op: Measurement operator. Any class that implements apinv()method can be used, e.g.,HadamSplit.kwargs: Additional keyword arguments that are passed to thepinv()method of the measurement operator. Can be used to specify a regularization parameter.
Shape:
x: \((*, M)\)meas_op: not applicableoutput: \((*, N)\)- Example:
>>> H = torch.rand([400,32*32]) >>> Perm = torch.rand([32*32,32*32]) >>> meas_op = HadamSplit(H, Perm, 32, 32) >>> y = torch.rand([85,400], dtype=torch.float) >>> pinv_op = PseudoInverse() >>> x = pinv_op(y, meas_op) >>> print(x.shape) torch.Size([85, 1024])