leakyRectifiedLinear
An activation function that returns its input when that is greater than or equal to zero, otherwise it returns its input multiplied by a specified value.
Declaration
static var leakyRectifiedLinear: BNNSActivationFunction { get }Discussion
This constant defines an activation function that returns values using the following operation:
alpha*x if x<0, and x if x>=0Use alpha to specify the multiplier for values less than zero range:
var activation = BNNSActivation(function: .leakyRectifiedLinear,
alpha: 0.25)The following illustrates the output that the activation function generates from inputs in the range -10...10:
[Image]