tensorflow::ops::FusedBatchNormGradV3

#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.
  • reserve_space_3: When is_training is True, a 1D Tensor for some intermediate results to be reused in gradient computation. When is_training is False, a dummy empty Tensor will be created.

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:

  • Output x_backprop: A 4D Tensor for the gradient with respect to x.
  • Output scale_backprop: A 1D Tensor for the gradient with respect to scale.
  • Output offset_backprop: A 1D Tensor for the gradient with respect to offset.
  • Output reserve_space_4: Unused placeholder to match the mean input in FusedBatchNorm.
  • Output reserve_space_5: Unused placeholder to match the variance input in FusedBatchNorm.

Constructors and Destructors

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

Public attributes

offset_backprop
operation
reserve_space_4
reserve_space_5
scale_backprop
x_backprop

Public static functions

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

Structs

tensorflow::ops::FusedBatchNormGradV3::Attrs

Optional attribute setters for FusedBatchNormGradV3.

Public attributes

offset_backprop

::tensorflow::Output offset_backprop

operation

Operation operation

reserve_space_4

::tensorflow::Output reserve_space_4

reserve_space_5

::tensorflow::Output reserve_space_5

scale_backprop

::tensorflow::Output scale_backprop

x_backprop

::tensorflow::Output x_backprop

Public functions

FusedBatchNormGradV3

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

FusedBatchNormGradV3

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

Public static functions

DataFormat

Attrs DataFormat(
  StringPiece x
)

Epsilon

Attrs Epsilon(
  float x
)

IsTraining

Attrs IsTraining(
  bool x
)