TVL1Prior#
- class deepinv.optim.TVL1Prior(def_crit=1e-8, n_it_max=1000, *args, **kwargs)[source]#
Bases:
TVPriorTotal Variation (TV) prior with an L1 norm.
This prior computes the isotropic total variation regularization term.
The prior is defined as:
\[\mathrm{TV}(x) = \sum_i \|\nabla x_i\|_1\]where \(\nabla x\) denotes the discrete gradient of x.
- Parameters:
- fn(x, *args, **kwargs)[source]#
Computes the regularizer
\[\reg{x} = \|Dx\|_{1}\]where D is the finite differences linear operator.
- Parameters:
x (torch.Tensor) – Variable \(x\) at which the prior is computed.
- Returns:
(
torch.Tensor) prior \(g(x)\).- Return type: