<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShadersGraph",
  "identifier" : "/documentation/MetalPerformanceShadersGraph/MPSGraphDepthwiseConvolution3DOpDescriptor/channelDimensionIndex",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal Performance Shaders Graph"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSGraphDepthwiseConvolution3DOpDescriptor(py)channelDimensionIndex"
  },
  "title" : "channelDimensionIndex"
}
-->

# channelDimensionIndex

The axis that contains the channels in the input and the weights, within
the 4D tile of the last dimensions.

```
var channelDimensionIndex: Int { get set }
```

## Discussion

For example the value of `-1` corresponds to `NDHWC`, `NHWC` layouts. This allows the placement
of the channel index anywhere within the last 4 dimensions of the tensor. In case your
weights are in a different layout you can bring them to the same layout
as inputs using transposes or permutations.
Default value: `-4`, corresponds to `NCDHW` and `CDHW` layouts.

---

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)