threshold_(x: Tensor, threshold_val: float, value: float, inplace: bool = True)In-place threshold — replace entries <= threshold_val with value.
Parameters
Input; modified in place.
threshold_valfloatCutoff; positions where
x <= threshold_val are reset.valuefloatReplacement value for clipped positions.
inplacebool= TrueIgnored. Default
True.Returns
TensorThe same x tensor, with sub-threshold positions set to
value and the rest unchanged.