Skip to contents

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.

Usage

activation_soft_shrink(x, threshold = 0.5)

Arguments

x

Input tensor.

threshold

Threshold value. Defaults to 0.5.

Value

A tensor, the result from applying the activation to the input tensor x.