spgl1_torch.py¶
Source: LION/classical_algorithms/spgl1_torch.py
SPGL1 sparse reconstruction with torch operators.
- LION.classical_algorithms.spgl1_torch.spgl1_torch(op, y, **spgl1_kwargs)[source]¶
Solve an l1 sparse reconstruction using SPGL1, wrapping torch operators.
This is a thin wrapper around the Python SPGL1 solver
spgl1.spgl1that uses torch operators for matrix-vector products. SPGL1 is a spectral projected-gradient method for constrained l1 problems; see [BergFriedlander2008] and [BergFriedlander2010].This wrapper is built on top of the Python implementation
spgl1.spgl1and uses the same calling convention (argument names and behaviour); see [SPGL1Python] for details.- Parameters:
op (Operator) – Linear operator implementing the forward map and its adjoint. It is called as
op(w)andop.adjoint(r).y (torch.Tensor) – Measurements, shape
(M,).spgl1_kwargs (dict) – Extra keyword args forwarded to
spgl1.spgl1(for example tolerances or iteration limits; see [SPGL1Python]).
- Returns:
w_hat – Estimated coefficient vector in the same shape as
op.adjoint(y*0).- Return type:
torch.Tensor
References
[BergFriedlander2008]E. van den Berg and M. P. Friedlander, “Probing the Pareto frontier for basis pursuit solutions”, SIAM Journal on Scientific Computing, 31(2):890-912, 2008.
[BergFriedlander2010]E. van den Berg and M. P. Friedlander, “Sparse optimisation with least-squares constraints”, TR-2010-02, Department of Computer Science, University of British Columbia, 2010.
[SPGL1Python] (1,2)SPGL1: Spectral Projected Gradient for L1 minimisation, Python package documentation, https://spgl1.readthedocs.io/