spyrit.core.inverse.Tikhonov.divide
- Tikhonov.divide(y: tensor, gamma: tensor) tensor[source]
Computes \(\cdot (A \Sigma A^T + \Gamma)^{-1} y\).
If
self.approxis True, the non-diagonal elements of \(A \Sigma A^T\) are set to zero, and the operation is computed as division between two vectors. Otherwise, the operation required the resolution of a linear system of equations.- Args:
y(torch.tensor): Input measurement tensor. Shape \((*, M)\).gamma(torch.tensor): Noise covariance tensor. Shape \((*, M, M)\).- Returns:
torch.tensor: The divided tensor. Shape \((*, M)\).
- Example:
>>> from spyrit.core.meas import Linear >>> M, N = 32, 64 >>> meas_op = Linear(torch.rand([M,N]), meas_shape=(1,N)) >>> sigma = torch.rand(N,N) >>> tikho = Tikhonov(meas_op, sigma, approx=False, reshape_output=True) >>> y = torch.rand(85, 3, M) >>> gamma = torch.eye(M).expand(85, 3, M, M) >>> print(tikho.divide(y, gamma).shape) torch.Size([85, 3, 32])