Structure

BNNSActivation

A structure containing common activation function parameters.

Declaration

struct BNNSActivation

Topics

Instance Properties

var function: BNNSActivationFunction

The activation function to use.

var alpha: Float

alpha parameter to the activation function.

var beta: Float

beta parameter to the activation function.

var iscale: Int32

Scale for integer functions.

var ioffset: Int32

Offset for integer functions.

var ishift: Int32

Shift for integer functions.

var iscale_per_channel: UnsafePointer<Int32>?

Scale per channel for integer functions.

var ioffset_per_channel: UnsafePointer<Int32>?

Offset per channel for integer functions.

var ishift_per_channel: UnsafePointer<Int32>?

Shift per channel for integer functions.

Type Methods

static func integerLinearSaturate(scale: Int32, offset: Int32, shift: Int32) -> BNNSActivation

Returns an activation function that computes an arithmetic shift, preserving sign.

See Also

Activation Layers

struct BNNSActivationFunction

A structure that contains layer functions.