SMIteration
- class deepinv.optim.optim_iterators.SMIteration(lamb=10, n_iter=50, preprocessing=<function SMIteration.<lambda>>, **kwargs)[source]
Bases:
OptimIterator
Iterator for Spectral Methods for
deepinv.physics.PhaseRetrieval()
.Class for a single iteration of the Spectral Methods algorithm to find the principal eigenvector of the regularized weighted covariance matrix:
\[\begin{equation*} M = \conj{B} \text{diag}(T(y)) B + \lambda I, \end{equation*}\]where \(B\) is the linear operator of the phase retrieval class, \(T(\cdot)\) is a preprocessing function for the measurements, and \(I\) is the identity matrix of corresponding dimensions. Parameter \(\lambda\) tunes the strength of regularization.
The iteration is given by
\[\begin{split}\begin{equation*} \begin{aligned} x_{k+1} &= M x_k \\ x_{k+1} &= \operatorname{prox}_{\gamma g}(x_{k+1}), \end{aligned} \end{equation*}\end{split}\]where \(\gamma\) is a stepsize that should satisfy \(\lambda \gamma \leq 2/\operatorname{Lip}(\|\nabla f\|)\).
- forward(x, cur_prior, cur_params, y, physics, *args)[source]
Single iteration of the spectral method.
- Parameters:
x (dict) – the current iterate \(x_k\).
cur_prior (deepinv.optim.prior) – Instance of the Prior class defining the current prior.
cur_params (dict) – Dictionary containing the current parameters of the algorithm.
y (torch.Tensor) – Input data.
physics (deepinv.physics) – Instance of the physics containing the forward operator.
- Returns:
The new iterate \(x_{k+1}\).