spyrit.core.torch.mult_2d_separable

spyrit.core.torch.mult_2d_separable(H: tensor, x: tensor) tensor[source]

Applies separable transform to batches of (2D) images.

This applies the same transform \(H\) to the rows and columns of a batch of images \(X\)

\[Y = H X H^T.\]
Args:

H (torch.tensor): Matrix \(H\) with shape \((a, b)\).

x (torch.tensor): Input tensor to transform with shape \((*, b, b)\) where \(*\) represents any number of batch dimensions.

Returns:

torch.tensor: Transformed image \(Y\) with shape \((*, a, a)\) where \(*\) is the same number of batch dimensions as the input tensor.