bartorch.soft_thresh#
- bartorch.soft_thresh()#
Soft thresholding,
x * max(1 - lamda / |x|, 0).- Parameters:
lamda (float) – Threshold, in the units of
input’s magnitude.input (torch.Tensor)
joint_axes (int or tuple of int, default=()) – Axes over which
|x|is the Euclidean norm, so that each fibre along them is shrunk as one vector; empty for element-wise.
- Returns:
The shape of
input.- Return type:
torch.Tensor