tf.keras.activations.hard_shrink

Hard Shrink activation function.

It is defined as:

hard_shrink(x) = x if |x| > threshold, hard_shrink(x) = 0 otherwise.

x Input tensor.
threshold Threshold value. Defaults to 0.5.