sparse.nn.solver.basis_pursuit_admm¶
- sparse.nn.solver.basis_pursuit_admm(A, b, lambd, M_inv=None, tol=0.0001, max_iters=100, return_stats=False)[source]¶
Basis Pursuit solver for the \(Q_1^\epsilon\) problem
\[\min_x \frac{1}{2} \left|\left| \boldsymbol{A}\vec{x} - \vec{b} \right|\right|_2^2 + \lambda \|x\|_1\]via the alternating direction method of multipliers (ADMM).
- Parameters
- A(N, M) torch.Tensor
The input weight matrix \(\boldsymbol{A}\).
- b(B, N) torch.Tensor
The right side of the equation \(\boldsymbol{A}\vec{x} = \vec{b}\).
- lambdfloat
\(\lambda\), controls the sparsity of \(\vec{x}\).
- tolfloat
The accuracy tolerance of ADMM.
- max_itersint
Run for at most max_iters iterations.
- Returns
- torch.Tensor
(B, M) The solution vector batch \(\vec{x}\).