spyrit.core.prep.DirectPoisson.forward
- DirectPoisson.forward(x: tensor) tensor[source]
Preprocess measurements to compensate for the affine image normalization
It computes \(\frac{2}{\alpha}x - H1\), where H1 represents the all-ones vector.
- Args:
x: batch of measurement vectors- Shape:
x: \((B, M)\) where \(B\) is the batch dimension
meas_op: the number of measurements
meas_op.Mshould match \(M\).Output: \((B, M)\)
- Example:
>>> x = torch.rand([10,400], dtype=torch.float) >>> H = torch.rand([400,32*32]) >>> meas_op = Linear(H) >>> prep_op = DirectPoisson(1.0, meas_op) >>> m = prep_op(x) >>> print(m.shape) torch.Size([10, 400])