Batch normalization.
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.
Nested Classes
| class | FusedBatchNormV3.Options |
Optional attributes for
FusedBatchNormV3
|
|
Public Methods
| Output <U> |
batchMean
()
A 1D Tensor for the computed batch mean, to be used by TensorFlow
to compute the running mean.
|
| Output <U> |
batchVariance
()
A 1D Tensor for the computed batch variance, to be used by
TensorFlow to compute the running variance.
|
| static <T extends Number, U extends Number> FusedBatchNormV3 <T, U> | |
| static FusedBatchNormV3.Options |
dataFormat
(String dataFormat)
|
| static FusedBatchNormV3.Options |
epsilon
(Float epsilon)
|
| static FusedBatchNormV3.Options |
exponentialAvgFactor
(Float exponentialAvgFactor)
|
| static FusedBatchNormV3.Options |
isTraining
(Boolean isTraining)
|
| Output <U> |
reserveSpace1
()
A 1D Tensor for the computed batch mean, to be reused
in the gradient computation.
|
| Output <U> |
reserveSpace2
()
A 1D Tensor for the computed batch variance (inverted variance
in the cuDNN case), to be reused in the gradient computation.
|
| Output <U> |
reserveSpace3
()
A 1D Tensor for some intermediate results, to be reused in the gradient
computation for better efficiency.
|
| Output <T> |
y
()
A 4D Tensor for output data.
|
Inherited Methods
Public Methods
public Output <U> batchMean ()
A 1D Tensor for the computed batch mean, to be used by TensorFlow to compute the running mean.
public Output <U> batchVariance ()
A 1D Tensor for the computed batch variance, to be used by TensorFlow to compute the running variance.
public static FusedBatchNormV3 <T, U> create ( Scope scope, Operand <T> x, Operand <U> scale, Operand <U> offset, Operand <U> mean, Operand <U> variance, Options... options)
Factory method to create a class wrapping a new FusedBatchNormV3 operation.
Parameters
| scope | current scope |
|---|---|
| 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. |
| options | carries optional attributes values |
Returns
- a new instance of FusedBatchNormV3
public static FusedBatchNormV3.Options dataFormat (String dataFormat)
Parameters
| dataFormat | The data format for x and y. Either "NHWC" (default) or "NCHW". |
|---|
public static FusedBatchNormV3.Options epsilon (Float epsilon)
Parameters
| epsilon | A small float number added to the variance of x. |
|---|
public static FusedBatchNormV3.Options isTraining (Boolean isTraining)
Parameters
| isTraining | A bool value to indicate the operation is for training (default) or inference. |
|---|
public Output <U> reserveSpace1 ()
A 1D Tensor for the computed batch mean, to be reused in the gradient computation.
public Output <U> reserveSpace2 ()
A 1D Tensor for the computed batch variance (inverted variance in the cuDNN case), to be reused in the gradient computation.
public Output <U> reserveSpace3 ()
A 1D Tensor for some intermediate results, to be reused in the gradient computation for better efficiency.