<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSDataLayoutConvolutionWeightsOIHrWr",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@EA@BNNSDataLayout@BNNSDataLayoutConvolutionWeightsOIHrWr"
  },
  "title" : "BNNSDataLayoutConvolutionWeightsOIHrWr"
}
-->

# BNNSDataLayoutConvolutionWeightsOIHrWr

A constant that represents a 4D array of rotated convolution weights.

```
var BNNSDataLayoutConvolutionWeightsOIHrWr: BNNSDataLayout { get }
```

## Discussion

The value `(kx, ky, InChannel, OutChannel)` is at index:

`(kw - 1 - kx) * stride[0] + (kh - 1 - ky) * stride[1] + OutChannel * stride[2] + InChannel * stride[3]`.

- `size[0]` is the convolution kernel width in pixels.
- `size[1]` is the convolution kernel height in pixels.
- `size[2]` is the number of output channels.
- `size[3]` is the number of input channels.
- `kw` is `size[0]` and `kx` is between `0` to `kw-1`.
- `kh` is `size[1]` and `ky` is between `0` to `kh-1`.

---

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)