---
title: "convolution3D(_:weights:descriptor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/convolution3d(_:weights:descriptor:name:)"
---

# convolution3D(_:weights:descriptor:name:)

Creates a 3D forward convolution operation and returns the result tensor.

## Declaration

```swift
func convolution3D(_ source: MPSGraphTensor, weights: MPSGraphTensor, descriptor: MPSGraphConvolution3DOpDescriptor, name: String?) -> MPSGraphTensor
```

## Parameters

- `source`: Source tensor - must be of rank 5. The layout is defined by descriptor.dataLayout.
- `weights`: Weights tensor, must be rank 5. The layout is defined by descriptor.weightsLayout.
- `descriptor`: Specifies strides, dilation rates, paddings and layouts.
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object
