FusedBatchNormGrad


tensorflow C++ API

tensorflow::ops::FusedBatchNormGrad

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.

Arguments:

  • 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: A 1D Tensor for the computed batch mean, to be reused in the gradient computation.
  • reserve_space_2: A 1D Tensor for the computed batch variance (inverted variance in the cuDNN case), to be used in the gradient computation.

Optional attributes (seeAttrs):

  • 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.
  • Outputscale_backprop: A 1D Tensor for the gradient with respect to scale.
  • Outputoffset_backprop: A 1D Tensor for the gradient with respect to offset.
  • Outputreserve_space_3: Unused placeholder to match the mean input in FusedBatchNorm.
  • Outputreserve_space_4: Unused placeholder to match the variance input in FusedBatchNorm .

FusedBatchNormGrad block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_nn.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • Input x: connect Input node.
  • Input scale: connect Input node.
  • Input offset: connect Input node.
  • Input mean: connect Input node.
  • Input variance: connect Input node.
  • FusedBatchNorm ::Attrs attrs : Input attrs in value. ex) pseudo_random_ = false;overlapping_ = false;deterministic_ = false;seed_ = 0;seed2_ = 0;

Return:

  • Output y: Output object of FractionalAvgPool class object.
  • Output batch_mean: Output object of FractionalAvgPool class object.
  • Output batch_variance: Output object of FractionalAvgPool class object.
  • Output reserve_space_1: Output object of FractionalAvgPool class object.
  • Output reserve_space_2: Output object of FractionalAvgPool class object.

Result:

  • std::vector(Tensor) result_y : Returned object of executed result by calling session.
  • std::vector(Tensor) result_batch_variance : Returned object of executed result by calling session.
  • std::vector(Tensor) result_batch_mean : Returned object of executed result by calling session.
  • std::vector(Tensor) result_reserve_space_1 : Returned object of executed result by calling session.
  • std::vector(Tensor) result_reserve_space_2 : Returned object of executed result by calling session.

Using Method

results matching ""

    No results matching ""