spyrit.core.meas.HadamSplit.forward
- HadamSplit.forward(x: tensor) tensor
Applies linear transform to incoming images: \(y = Px\).
This is equivalent to computing \(x \cdot P^T\).
Warning
This method uses the splitted measurement matrix \(P\) to compute the linear measurements from incoming images. If you want to apply the operator \(H\) directly, use the method
forward_H().- Args:
\(x\) (torch.tensor): Batch of vectorized (flattened) images. If x has more than 1 dimension, the linear measurement is applied to each image in the batch.
- Shape:
\(x\): \((*, N)\) where * denotes the batch size and N the total number of pixels in the image.
Output: \((*, 2M)\) where * denotes the batch size and M the number of measurements.
- Example:
>>> H = torch.randn(400, 1600) >>> meas_op = LinearSplit(H) >>> x = torch.randn(10, 1600) >>> y = meas_op(x) >>> print(y.shape) torch.Size([10, 800])