tf.keras.activations.soft_shrink

Soft Shrink activation function.

It is defined as:

soft_shrink(x) = x - threshold if x > threshold, soft_shrink(x) = x + threshold if x < -threshold, soft_shrink(x) = 0 otherwise.

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