T
- data type for y()
outputU
- data type for batchMean()
output@Operator(group="nn") public final class FusedBatchNorm<T extends Number,U extends Number> extends PrimitiveOp
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.
Modifier and Type | Class and Description |
---|---|
static class |
FusedBatchNorm.Options
Optional attributes for
FusedBatchNorm |
operation
Modifier and Type | Method and Description |
---|---|
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> |
create(Scope scope,
Operand<T> x,
Operand<U> scale,
Operand<U> offset,
Operand<U> mean,
Operand<U> variance,
FusedBatchNorm.Options... options)
Factory method to create a class wrapping a new FusedBatchNorm operation.
|
static FusedBatchNorm.Options |
dataFormat(String dataFormat) |
static FusedBatchNorm.Options |
epsilon(Float epsilon) |
static FusedBatchNorm.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<T> |
y()
A 4D Tensor for output data.
|
equals, hashCode, op, toString
public static <T extends Number,U extends Number> FusedBatchNorm<T,U> create(Scope scope, Operand<T> x, Operand<U> scale, Operand<U> offset, Operand<U> mean, Operand<U> variance, FusedBatchNorm.Options... options)
scope
- current scopex
- 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 valuespublic static FusedBatchNorm.Options epsilon(Float epsilon)
epsilon
- A small float number added to the variance of x.public static FusedBatchNorm.Options dataFormat(String dataFormat)
dataFormat
- The data format for x and y. Either "NHWC" (default) or "NCHW".public static FusedBatchNorm.Options isTraining(Boolean isTraining)
isTraining
- A bool value to indicate the operation is for training (default)
or inference.public Output<U> batchMean()
public Output<U> batchVariance()
public Output<U> reserveSpace1()
Copyright © 2022. All rights reserved.