Contents

BNNS.ActivationFunction.scaledTanh(alpha:beta:)

An activation function that returns the scaled hyperbolic tangent of its input.

Declaration

case scaledTanh(alpha: Float, beta: Float)

Discussion

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

alpha*tanh(x*beta)

Use alpha and beta to specify the scale and input multiplier:

var activation = BNNSActivation(function: .scaledTanh, 
                                alpha: 1, 
                                beta: 0.5)

The following illustrates the output that the activation function generates from inputs in the range -10...10:

[Image]

See Also

Activation Functions