tfmri.math.soft_threshold
tfmri.math.soft_threshold¶
- soft_threshold(x, threshold, name=None)[source]¶
Soft thresholding operator.
In the context of proximal gradient methods, this function is the proximal operator of \(f = {\left\| x \right\|}_{1}\) (L1 norm).
- Parameters
x – A
Tensor
of shape[..., n]
.threshold – A float.
name – A name for this operation (optional).
- Returns
A
Tensor
of shape[..., n]
and same dtype asx
.