Contents

init(data:data_type:data_scale:data_bias:data_table:)

Returns a new layer data structure.

Declaration

init(data: UnsafeRawPointer?, data_type: BNNSDataType, data_scale: Float, data_bias: Float, data_table: UnsafePointer<Float>?)

Parameters

  • data:

    Pointer to layer values (weights, bias), layout and size are specific to each layer.

  • data_type:

    Storage data type for the values stored in Data.

  • data_scale:

    Conversion scale for values, used for integer data types only, ignored for indexed and float data types.

  • data_bias:

    Conversion bias for values, used for integer data types only, ignored for indexed and float data types.

  • data_table:

    Conversion table (256 values) for indexed floating point data, used for indexed data types only.

Return Value

A new layer data structure.

See Also

Initializers