FusedBatchNorm


tensorflow C++ API

tensorflow::ops::FusedBatchNorm

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
  • x: A 4D Tensor for input data.
  • scale: A 1D Tensor for scaling factor, to scale the normalized x.
  • offset: A 1D Tensor for offset, to shift to the normalized x.
  • mean: A 1D Tensor for population mean. Used for inference only; must be empty for training.
  • variance: A 1D Tensor for population variance. Used for inference only; must be empty for training.

Optional attributes (seeAttrs):

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

Returns:

  • Output y: A 4D Tensor for output data.
  • Outputbatch_mean: A 1D Tensor for the computed batch mean, to be used by TensorFlow to compute the running mean.
  • Outputbatch_variance: A 1D Tensor for the computed batch variance, to be used by TensorFlow to compute the running variance.
  • Outputreserve_space_1: A 1D Tensor for the computed batch mean, to be reused in the gradient computation.
  • Outputreserve_space_2: A 1D Tensor for the computed batch variance (inverted variance in the cuDNN case), to be used in the gradient computation.

FusedBatchNorm 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 ""