tf.nn.fused_batch_norm
Stay organized with collections
Save and categorize content based on your preferences.
Batch normalization.
tf.nn.fused_batch_norm(
x, scale, offset, mean=None, variance=None, epsilon=0.001, data_format='NHWC',
is_training=True, name=None
)
See Source: Batch Normalization: Accelerating Deep Network Training by
Reducing Internal Covariate Shift; S. Ioffe, C. Szegedy.
Args |
x
|
Input Tensor of 4 dimensions.
|
scale
|
A Tensor of 1 dimension for scaling.
|
offset
|
A Tensor of 1 dimension for bias.
|
mean
|
A Tensor of 1 dimension for population mean used for inference.
|
variance
|
A Tensor of 1 dimension for population variance
used for inference.
|
epsilon
|
A small float number added to the variance of x.
|
data_format
|
The data format for x. Either "NHWC" (default) or "NCHW".
|
is_training
|
A bool value to specify if the operation is used for
training or inference.
|
name
|
A name for this operation (optional).
|
Returns |
y
|
A 4D Tensor for the normalized, scaled, offsetted x.
|
batch_mean
|
A 1D Tensor for the mean of x.
|
batch_var
|
A 1D Tensor for the variance of x.
|
Raises |
ValueError
|
If mean or variance is not None when is_training is True.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.nn.fused_batch_norm\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/nn_impl.py#L1437-L1518) |\n\nBatch normalization.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.nn.fused_batch_norm`](/api_docs/python/tf/compat/v1/nn/fused_batch_norm)\n\n\u003cbr /\u003e\n\n tf.nn.fused_batch_norm(\n x, scale, offset, mean=None, variance=None, epsilon=0.001, data_format='NHWC',\n is_training=True, name=None\n )\n\nSee Source: [Batch Normalization: Accelerating Deep Network Training by\nReducing Internal Covariate Shift; S. Ioffe, C. Szegedy](http://arxiv.org/abs/1502.03167).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------------|-----------------------------------------------------------------------------|\n| `x` | Input `Tensor` of 4 dimensions. |\n| `scale` | A `Tensor` of 1 dimension for scaling. |\n| `offset` | A `Tensor` of 1 dimension for bias. |\n| `mean` | A `Tensor` of 1 dimension for population mean used for inference. |\n| `variance` | A `Tensor` of 1 dimension for population variance used for inference. |\n| `epsilon` | A small float number added to the variance of x. |\n| `data_format` | The data format for x. Either \"NHWC\" (default) or \"NCHW\". |\n| `is_training` | A bool value to specify if the operation is used for training or inference. |\n| `name` | A name for this operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|--------------|------------------------------------------------------|\n| `y` | A 4D Tensor for the normalized, scaled, offsetted x. |\n| `batch_mean` | A 1D Tensor for the mean of x. |\n| `batch_var` | A 1D Tensor for the variance of x. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|-----------------------------------------------------------|\n| `ValueError` | If mean or variance is not None when is_training is True. |\n\n\u003cbr /\u003e"]]