<!--
{
  "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 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShadersGraph",
  "identifier" : "/documentation/MetalPerformanceShadersGraph/MPSGraph/convolutionTranspose2DDataGradient(_:weights:outputShape:forwardConvolutionDescriptor:name:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal Performance Shaders Graph",
      "MetalPerformanceShadersGraph"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSGraph(im)convolutionTranspose2DDataGradientWithIncomingGradientTensor:weightsTensor:outputShape:forwardConvolutionDescriptor:name:"
  },
  "title" : "convolutionTranspose2DDataGradient(_:weights:outputShape:forwardConvolutionDescriptor:name:)"
}
-->

# convolutionTranspose2DDataGradient(_:weights:outputShape:forwardConvolutionDescriptor:name:)

Creates a convolution transpose gradient operation with respect to the source tensor of convolution transpose operation and returns the result tensor.

```
func convolutionTranspose2DDataGradient(_ incomingGradient: MPSGraphTensor, weights: MPSGraphTensor, outputShape: [NSNumber], forwardConvolutionDescriptor: MPSGraphConvolution2DOpDescriptor, name: String?) -> MPSGraphTensor
```

## Parameters

`incomingGradient`

Incoming gradient tensor

`weights`

Forward pass weights tensor

`outputShape`

Shape of the forward pass source tensor

`forwardConvolutionDescriptor`

Forward pass op descriptor

`name`

The name for the operation.

## Return Value

A valid MPSGraphTensor object

## Discussion

Inserts an operation in graph to compute gradient of convolution transpose with respect to source tensor of the corresponding
convolution transpose operation.

---

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)