---
title: MPSGraphDepthwiseConvolution2DOpDescriptor
framework: metalperformanceshadersgraph
role: symbol
role_heading: Class
path: metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor
---

# MPSGraphDepthwiseConvolution2DOpDescriptor

A class that defines the parameters for  a 2D-depthwise convolution operation.

## Declaration

```swift
class MPSGraphDepthwiseConvolution2DOpDescriptor
```

## Overview

Overview An MPSGraphDepthwiseConvolution2DOpDescriptor defines constant parameters for 2D-depthwise convolutions. Use this class with depthwiseConvolution2D(_:weights:descriptor:name:), depthwiseConvolution2DDataGradient(_:weights:outputShape:descriptor:name:), and depthwiseConvolution2DWeightsGradient(_:source:outputShape:descriptor:name:) methods.

## Topics

### Initializers

- [init(dataLayout:weightsLayout:)](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/init(datalayout:weightslayout:).md)
- [init(strideInX:strideInY:dilationRateInX:dilationRateInY:paddingLeft:paddingRight:paddingTop:paddingBottom:paddingStyle:dataLayout:weightsLayout:)](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/init(strideinx:strideiny:dilationrateinx:dilationrateiny:paddingleft:paddingright:paddingtop:paddingbottom:paddingstyle:datalayout:weightslayout:).md)

### Instance Properties

- [dataLayout](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/datalayout.md)
- [dilationRateInX](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/dilationrateinx.md)
- [dilationRateInY](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/dilationrateiny.md)
- [paddingBottom](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/paddingbottom.md)
- [paddingLeft](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/paddingleft.md)
- [paddingRight](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/paddingright.md)
- [paddingStyle](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/paddingstyle.md)
- [paddingTop](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/paddingtop.md)
- [strideInX](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/strideinx.md)
- [strideInY](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/strideiny.md)
- [weightsLayout](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/weightslayout.md)

### Instance Methods

- [setExplicitPaddingWithPaddingLeft(_:paddingRight:paddingTop:paddingBottom:)](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution2dopdescriptor/setexplicitpaddingwithpaddingleft(_:paddingright:paddingtop:paddingbottom:).md)

## Relationships

### Inherits From

- [MPSGraphObject](metalperformanceshadersgraph/mpsgraphobject.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Classes

- [MPSGraph](metalperformanceshadersgraph/mpsgraph.md)
- [MPSGraphCompilationDescriptor](metalperformanceshadersgraph/mpsgraphcompilationdescriptor.md)
- [MPSGraphConvolution2DOpDescriptor](metalperformanceshadersgraph/mpsgraphconvolution2dopdescriptor.md)
- [MPSGraphConvolution3DOpDescriptor](metalperformanceshadersgraph/mpsgraphconvolution3dopdescriptor.md)
- [MPSGraphCreateSparseOpDescriptor](metalperformanceshadersgraph/mpsgraphcreatesparseopdescriptor.md)
- [MPSGraphDepthwiseConvolution3DOpDescriptor](metalperformanceshadersgraph/mpsgraphdepthwiseconvolution3dopdescriptor.md)
- [MPSGraphDevice](metalperformanceshadersgraph/mpsgraphdevice.md)
- [MPSGraphExecutable](metalperformanceshadersgraph/mpsgraphexecutable.md)
- [MPSGraphExecutableExecutionDescriptor](metalperformanceshadersgraph/mpsgraphexecutableexecutiondescriptor.md)
- [MPSGraphExecutableSerializationDescriptor](metalperformanceshadersgraph/mpsgraphexecutableserializationdescriptor.md)
- [MPSGraphExecutionDescriptor](metalperformanceshadersgraph/mpsgraphexecutiondescriptor.md)
- [MPSGraphFFTDescriptor](metalperformanceshadersgraph/mpsgraphfftdescriptor.md)
- [MPSGraphGRUDescriptor](metalperformanceshadersgraph/mpsgraphgrudescriptor.md)
- [MPSGraphImToColOpDescriptor](metalperformanceshadersgraph/mpsgraphimtocolopdescriptor.md)
- [MPSGraphLSTMDescriptor](metalperformanceshadersgraph/mpsgraphlstmdescriptor.md)
