Contents

BNNSActivationFunctionHardShrink

An activation function that returns zero when the absolute input is less than alpha, otherwise it returns its input.

Declaration

var BNNSActivationFunctionHardShrink: BNNSActivationFunction { get }

Discussion

This constant defines an activation function that returns values using the following operation:

abs(x) < abs(alpha)
    0
else
    x

The following illustrates the output that the activation function generates from inputs in the range -10...10 and an alpha of 5:

[Image]

See Also

Raw Values