# tensorflow::ops::FusedBatchNormGradV2 Class Reference

# tensorflow::
ops::
FusedBatchNormGradV2

`
#include <nn_ops.h>
`


Gradient for batch normalization.

## Summary


Note that the size of 4D Tensors are defined by either "NHWC" or "NCHW". The size of 1D Tensors matches the dimension C of the 4D Tensors.


Args:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- y_backprop: A 4D [Tensor](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the gradient with respect to y.
- x: A 4D [Tensor](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for input data.
- scale: A 1D [Tensor](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for scaling factor, to scale the normalized x.
- reserve_space_1: When is_training is True, a 1D [Tensor](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the computed batch mean to be reused in gradient computation. When is_training is False, a 1D [Tensor](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the population mean to be reused in both 1st and 2nd order gradient computation.
- reserve_space_2: When is_training is True, a 1D [Tensor](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the computed batch variance (inverted variance in the cuDNN case) to be reused in gradient computation. When is_training is False, a 1D [Tensor](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the population variance to be reused in both 1st and 2nd order gradient computation.

<br />


Optional attributes (see
`
https://www.tensorflow.org/versions/r2.6/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1_1_attrs
`
):

- epsilon: A small float number added to the variance of x.
- data_format: The data format for y_backprop, x, x_backprop. Either "NHWC" (default) or "NCHW".
- is_training: A bool value to indicate the operation is for training (default) or inference.

<br />


Returns:

- `
  https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output
  ` x_backprop: A 4D [Tensor](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the gradient with respect to x.
- `
  https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output
  ` scale_backprop: A 1D [Tensor](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the gradient with respect to scale.
- `
  https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output
  ` offset_backprop: A 1D [Tensor](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) for the gradient with respect to offset.
- `
  https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output
  ` reserve_space_3: Unused placeholder to match the mean input in [FusedBatchNorm](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm#classtensorflow_1_1ops_1_1_fused_batch_norm) .
- `
  https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output
  ` reserve_space_4: Unused placeholder to match the variance input in [FusedBatchNorm](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm#classtensorflow_1_1ops_1_1_fused_batch_norm) .

<br />

| ### Constructors and Destructors ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a86c8eb15c1fa6e765c1d7648e45357f4 (const :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input y_backprop, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input x, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input scale, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input reserve_space_1, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input reserve_space_2) ` ||
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1ad137349082f7495a1b3ab2c72854a8b5 (const :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input y_backprop, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input x, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input scale, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input reserve_space_1, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input reserve_space_2, const https://www.tensorflow.org/versions/r2.6/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1_1_attrs & attrs) ` ||

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a573a935b4cc1b1bb19d4a2d75ebbf13d ` | ` :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output ` |
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a4742048a5a4d494a534ebb4253cef274 ` | ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation ` |
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1aed1a4427bd98ce56394aef062fb9cecb ` | ` :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output ` |
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a5cadd7c94138dc3e294245ca7a0cb18f ` | ` :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output ` |
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1ad01de4d69bdfca21353023d588abf004 ` | ` :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output ` |
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a5eecc4926429818678c3e35d36b11930 ` | ` :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output ` |

| ### Public static functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a7143f83d7e6e604147b10e6be3b7f5ba (StringPiece x) ` | ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1_1_attrs ` |
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a991011a32051ef190fd0028fbb5f7fb5 (float x) ` | ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1_1_attrs ` |
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1a87dc995a72a9c52136f68d7eb2b8b588 (bool x) ` | ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs#structtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2_1_1_attrs ` |

| ### Structs ||
|---|---|
| [tensorflow:: ops:: FusedBatchNormGradV2:: Attrs](https://www.tensorflow.org/versions/r2.6/api_docs/cc/struct/tensorflow/ops/fused-batch-norm-grad-v2/attrs) | Optional attribute setters for [FusedBatchNormGradV2](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/fused-batch-norm-grad-v2#classtensorflow_1_1ops_1_1_fused_batch_norm_grad_v2) . |

## Public attributes

### offset_backprop

```
::tensorflow::Output offset_backprop
```

### operation

```
Operation operation
```

### reserve_space_3

```
::tensorflow::Output reserve_space_3
```

### reserve_space_4

```
::tensorflow::Output reserve_space_4
```

### scale_backprop

```
::tensorflow::Output scale_backprop
```

### x_backprop

```
::tensorflow::Output x_backprop
```

## Public functions

### FusedBatchNormGradV2

```
 FusedBatchNormGradV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input y_backprop,
  ::tensorflow::Input x,
  ::tensorflow::Input scale,
  ::tensorflow::Input reserve_space_1,
  ::tensorflow::Input reserve_space_2
)
```

### FusedBatchNormGradV2

```
 FusedBatchNormGradV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input y_backprop,
  ::tensorflow::Input x,
  ::tensorflow::Input scale,
  ::tensorflow::Input reserve_space_1,
  ::tensorflow::Input reserve_space_2,
  const FusedBatchNormGradV2::Attrs & attrs
)
```

## Public static functions

### DataFormat

```
Attrs DataFormat(
  StringPiece x
)
```

### Epsilon

```
Attrs Epsilon(
  float x
)
```

### IsTraining

```
Attrs IsTraining(
  bool x
)
```