---
title: "avgPooling4D(_:descriptor:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/avgpooling4d(_:descriptor:name:)"
---

# avgPooling4D(_:descriptor:name:)

Creates a 4D average pooling operation and returns the result tensor.

## Declaration

```swift
func avgPooling4D(_ source: MPSGraphTensor, descriptor: MPSGraphPooling4DOpDescriptor, name: String?) -> MPSGraphTensor
```

## Parameters

- `source`: A source tensor.
- `descriptor`: A pooling operation descriptor that specifies pooling window sizes, strides, dilation rates and paddings.
- `name`: The name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object
