---
title: "mean(of:axes:name:)"
framework: metalperformanceshadersgraph
role: symbol
role_heading: Instance Method
path: "metalperformanceshadersgraph/mpsgraph/mean(of:axes:name:)"
---

# mean(of:axes:name:)

Returns the mean of the first input along the specified axes.

## Declaration

```swift
func mean(of tensor: MPSGraphTensor, axes: [NSNumber], name: String?) -> MPSGraphTensor
```

## Parameters

- `axes`: A list of axes over which to perform the reduction. The order of dimensions goes from the slowest moving at axis=0 to the fastest moving dimension.
- `name`: An optional name for the operation.

## Return Value

Return Value A valid MPSGraphTensor object.
