Kevin - 1 year ago 887

Python Question

Just looking for the equivalent of np.std() in TensorFlow to calculate the standard deviation of a tensor.

Recommended for you: Get network issues from **WhatsUp Gold**. **Not end users.**

Answer Source

To get the mean and variance just use tf.nn.moments.

```
mean, var = tf.nn.moments(x,axes=[1])
```

for more on tf.nn.moments params see docs

Recommended from our users: **Dynamic Network Monitoring from WhatsUp Gold from IPSwitch**. ** Free Download**