L1Prior#

class deepinv.optim.L1Prior(*args, **kwargs)[source]#

Bases: Prior

\(\ell_1\) prior \(\reg{x} = \| x \|_1\).

fn(x, *args, **kwargs)[source]#

Computes the regularizer \(\reg{x} = \| x \|_1\).

Parameters:

x (torch.Tensor) – Variable \(x\) at which the prior is computed.

Returns:

(torch.Tensor) prior \(\reg{x}\).

prox(x, *args, ths=1.0, gamma=1.0, **kwargs)[source]#

Calculates the proximity operator of the l1 regularization term \(\regname\) at \(x\).

More precisely, it computes

\[\operatorname{prox}_{\gamma g}(x) = \operatorname{sign}(x) \max(|x| - \gamma, 0)\]

where \(\gamma\) is a stepsize.

Parameters:
  • x (torch.Tensor) – Variable \(x\) at which the proximity operator is computed.

  • gamma (float) – stepsize of the proximity operator.

Return torch.Tensor:

proximity operator at \(x\).