<!--
{
  "availability" : [
    "iOS: 15.0.0 - 18.0.0",
    "iPadOS: 15.0.0 - 18.0.0",
    "macCatalyst: 15.0.0 - 18.0.0",
    "macOS: 12.0.0 - 15.0.0",
    "tvOS: 15.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 8.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSLayerParametersQuantization/init(axis_mask:function:i_desc:o_desc:scale:bias:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:So31BNNSLayerParametersQuantizationa9axis_mask8function6i_desc02o_G05scale4biasABSi_So21BNNSQuantizerFunctionaSo21BNNSNDArrayDescriptoraA3Ltcfc"
  },
  "title" : "init(axis_mask:function:i_desc:o_desc:scale:bias:)"
}
-->

# init(axis_mask:function:i_desc:o_desc:scale:bias:)

Returns a new quantization layer parameters structure using the supplied parameters.

```
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 `0` to 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)