bartorch.hard_thresh

Contents

bartorch.hard_thresh#

bartorch.hard_thresh()#

Hard thresholding: keep x where |x| > lamda, zero elsewhere.

BART’s threshold -H.

Parameters:
  • lamda (float) – Threshold, in the units of input’s magnitude.

  • input (torch.Tensor) – Array to threshold.

Returns:

The shape of input.

Return type:

torch.Tensor