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

# variance(of:mean:axes:name:)

Returns the variance of the first input along the specified axes when the mean has been precomputed.

## Declaration

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

## Parameters

- `axes`: A list of axes over which to perform the reduction such that 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.
