spyrit.core.recon.PseudoInverse
- class spyrit.core.recon.PseudoInverse[source]
Bases:
ModuleMoore-Penrose pseudoinverse.
Considering linear measurements \(y = Hx\), where \(H\) is the measurement matrix and \(x\) is a vectorized image, it estimates \(x\) from \(y\) by computing \(\hat{x} = H^\dagger y\), where \(H\) is the Moore-Penrose pseudo inverse of \(H\).
- 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])
Methods
forward(x, meas_op, **kwargs)Computes pseudo-inverse of measurements.