<!--
{
  "availability" : [
    "iOS: 14.0.0 - 18.0.0",
    "iPadOS: 14.0.0 - 18.0.0",
    "macCatalyst: 14.0.0 - 18.0.0",
    "macOS: 11.0.0 - 15.0.0",
    "tvOS: 14.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 7.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSLayerParametersResize/init(method:i_desc:o_desc:align_corners:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:So25BNNSLayerParametersResizea6method6i_desc02o_E013align_cornersABSo23BNNSInterpolationMethoda_So21BNNSNDArrayDescriptoraAJSbtcfc"
  },
  "title" : "init(method:i_desc:o_desc:align_corners:)"
}
-->

# init(method:i_desc:o_desc:align_corners:)

Returns a new resize-layer parameters structure from the specified parameters.

```
init(method: BNNSInterpolationMethod, i_desc: BNNSNDArrayDescriptor, o_desc: BNNSNDArrayDescriptor, align_corners: Bool)
```

## Parameters

`method`

The interpolation method for resizing.

`i_desc`

The descriptor of the input.

`o_desc`

The descriptor of the output.

`align_corners`

A Boolean value that specifies whether to align the corners of the upscaling grid to the center of scaling dimensions instead of to the edges.

## Discussion

> Important:
> The number of input dimensions must be equal to number of output dimensions. The resize must be in same direction for all dimensions.

---

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)