scaledTanh
An activation function that returns the scaled hyperbolic tangent of its input.
Declaration
static var scaledTanh: BNNSActivationFunction { get }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]