|TensorFlow 2 version||View source on GitHub|
Calculate the mean and variance of
Compat aliases for migration
See Migration guide for more details.
tf.nn.moments( x, axes, shift=None, name=None, keep_dims=None, keepdims=None )
The mean and variance are calculated by aggregating the contents of
x is 1-D and
axes =  this is just the mean
and variance of a vector.
When using these moments for batch normalization (see
- for so-called "global normalization", used with convolutional filters with
[batch, height, width, depth], pass
axes=[0, 1, 2].
- for simple batch normalization pass
||Array of ints. Axes along which to compute mean and variance.|
||Not used in the current implementation|
||Name used to scope the operations that compute the moments.|
||produce moments with the same dimensionality as the input.|
||Alias to keep_dims.|