spyrit.core.meas.DynamicHadamSplit2d.unvectorize

DynamicHadamSplit2d.unvectorize(input: tensor) tensor

Unflatten the measured dimensions.

This method expands the last dimension into the measurement or image shape (self.meas_shape or self.img_shape), and then moves the expanded dimensions to their original positions as defined by self.meas_dims.

Input:

input (torch.tensor): A tensor of shape (*, self.N) or (*, self.L) where * denotes any batch size.

Output:

torch.tensor: A tensor whose dimensions given by self.meas_dims have shape self.meas_shape or self.img_shape.

Raises:

ValueError: If the last dimension of input is different from self.N or self.L

See also:

For the opposite operation use vectorize().