Description Usage Arguments Details Value Computes soft shrink function
Soft shrink function.
1 | activation_softshrink(x, lower = -0.5, upper = 0.5)
|
x |
A 'Tensor'. Must be one of the following types: 'float16', 'float32', 'float64'. |
lower |
'float', lower bound for setting values to zeros. |
upper |
'float', upper bound for setting values to zeros. Returns: A 'Tensor'. Has the same type as 'x'. |
Computes soft shrink function: 'x - lower if x < lower, x - upper if x > upper else 0'.
A 'Tensor'. Has the same type as 'x'.
'x - lower if x < lower, x - upper if x > upper else 0'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.