# Method mean

#### static member mean: Tensor<'T> -> 'T

Calculates the mean of the tensor.

##### Declaration

`static member mean: a:Tensor<'T> -> 'T`

##### Parameters

Type | Name | Description |
---|---|---|

Tensor<'T> | a | The tensor containing the source values. |

##### Returns

Type | Description |
---|---|

'T | The mean estimate. |

##### Remarks

The mean is calculated over all elements of the tensor.

##### Examples

```
let a = HostTensor.ofList2D [[1.0; 2.0; 3.0; 4.0]
[5.0; 6.0; 7.0; 8.0]]
let b = Tensor.mean a // b = 4.5
```