Contents

BNNS.ActivationFunction.threshold(alpha:beta:)

An activation function that returns beta if its input is less than a specified threshold, otherwise it returns its input.

Declaration

case threshold(alpha: Float, beta: Float)

Discussion

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

if x <= alpha
    beta
else
    x

The following illustrates the output that the activation function generates from inputs in the range -10...10, an alpha of 0.0, and a beta of 5.0:

[Image]

See Also

Activation Functions