BNNSActivationFunctionThreshold
An activation function that returns beta if its input is less than a specified threshold, otherwise it returns its input.
Declaration
var BNNSActivationFunctionThreshold: BNNSActivationFunction { get }Discussion
This constant defines an activation function that returns values using the following operation:
if x <= alpha
beta
else
xThe 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
Raw Values
init(_:)init(rawValue:)rawValueBNNSActivationFunctionAbsBNNSActivationFunctionCELUBNNSActivationFunctionClampedLeakyRectifiedLinearBNNSActivationFunctionELUBNNSActivationFunctionErfBNNSActivationFunctionGELUBNNSActivationFunctionGELUApproximationBNNSActivationFunctionGELUApproximation2BNNSActivationFunctionGELUApproximationSigmoidBNNSActivationFunctionGumbelBNNSActivationFunctionGumbelMaxBNNSActivationFunctionHardShrink