ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

tensorflow:: ops:: FusedBatchNormGrad

#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 object
  • y_backprop: A 4D Tensor for the gradient with respect to y.
  • x: A 4D Tensor for input data.
  • scale: A 1D Tensor for scaling factor, to scale the normalized x.
  • reserve_space_1: When is_training is True, a 1D Tensor for the computed batch mean to be reused in gradient computation. When is_training is False, a 1D 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 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 for the population variance to be reused in both 1st and 2nd order gradient computation.

Optional attributes (see 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.

Returns:

Constructors and Destructors

FusedBatchNormGrad (const :: tensorflow::Scope & scope, :: tensorflow::Input y_backprop, :: tensorflow::Input x, :: tensorflow::Input scale, :: tensorflow::Input reserve_space_1, :: tensorflow::Input reserve_space_2)
FusedBatchNormGrad (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 FusedBatchNormGrad::Attrs & attrs)

Public attributes

offset_backprop
operation
reserve_space_3
reserve_space_4
scale_backprop
x_backprop

Public static functions

DataFormat (StringPiece x)
Epsilon (float x)
IsTraining (bool x)

Structs

tensorflow:: ops:: FusedBatchNormGrad:: Attrs

Optional attribute setters for FusedBatchNormGrad .

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

FusedBatchNormGrad

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

FusedBatchNormGrad

 FusedBatchNormGrad(
  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 FusedBatchNormGrad::Attrs & attrs
)

Public static functions

DataFormat

Attrs DataFormat(
  StringPiece x
)

Epsilon

Attrs Epsilon(
  float x
)

IsTraining

Attrs IsTraining(
  bool x
)