spyrit.core.meas.HadamSplit.forward_H
- HadamSplit.forward_H(x: tensor) tensor
Applies linear transform to incoming images: \(m = Hx\).
This method uses the measurement matrix \(H\) to compute the linear measurements from incoming images.
- Args:
x(torch.tensor): Batch of vectorized (flatten) 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: \((*, M)\) 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.forward_H(x) >>> print(y.shape) torch.Size([10, 400])