Contents

linear

An activation function that returns its input multiplied by a specified value.

Declaration

static var linear: BNNSActivationFunction { get }

Discussion

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

alpha*x

Use alpha to specify the multiplier:

var activation = BNNSActivation(function: .linear,
                                alpha: 0.2)

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

[Image]

See Also

Activation Functions