init(axis_mask:function:i_desc:o_desc:scale:bias:)
Returns a new quantization layer parameters structure using the supplied parameters.
Declaration
init(axis_mask: Int, function: BNNSQuantizerFunction, i_desc: BNNSNDArrayDescriptor, o_desc: BNNSNDArrayDescriptor, scale: BNNSNDArrayDescriptor, bias: BNNSNDArrayDescriptor)Parameters
- axis_mask:
A bitmask that defines the axis to which the function applies scale and bias. Set to
0to apply scale and bias to the entire tensor. - function:
The quantize function.
- i_desc:
The descriptor of the input.
- o_desc:
The descriptor of the output.
- scale:
The descriptor of the scale.
- bias:
The descriptor of the bias.