---
title: "convolutionTranspose2DDataGradient(_:weights:outputShape:forwardConvolutionDescriptor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/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.

## Declaration

```swift
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

Return Value A valid MPSGraphTensor object

## Discussion

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