T
- data type for xBackprop()
outputU
- data type for scaleBackprop()
output@Operator public final class FusedBatchNormGradV3<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 |
FusedBatchNormGradV3.Options
Optional attributes for
FusedBatchNormGradV3 |
operation
Modifier and Type | Method and Description |
---|---|
static <T extends Number,U extends Number> |
create(Scope scope,
Operand<T> yBackprop,
Operand<T> x,
Operand<Float> scale,
Operand<U> reserveSpace1,
Operand<U> reserveSpace2,
Operand<U> reserveSpace3,
FusedBatchNormGradV3.Options... options)
Factory method to create a class wrapping a new FusedBatchNormGradV3 operation.
|
static FusedBatchNormGradV3.Options |
dataFormat(String dataFormat) |
static FusedBatchNormGradV3.Options |
epsilon(Float epsilon) |
static FusedBatchNormGradV3.Options |
isTraining(Boolean isTraining) |
Output<U> |
offsetBackprop()
A 1D Tensor for the gradient with respect to offset.
|
Output<U> |
reserveSpace4()
Unused placeholder to match the mean input in FusedBatchNorm.
|
Output<U> |
reserveSpace5()
Unused placeholder to match the variance input
in FusedBatchNorm.
|
Output<U> |
scaleBackprop()
A 1D Tensor for the gradient with respect to scale.
|
Output<T> |
xBackprop()
A 4D Tensor for the gradient with respect to x.
|
equals, hashCode, op, toString
public static <T extends Number,U extends Number> FusedBatchNormGradV3<T,U> create(Scope scope, Operand<T> yBackprop, Operand<T> x, Operand<Float> scale, Operand<U> reserveSpace1, Operand<U> reserveSpace2, Operand<U> reserveSpace3, FusedBatchNormGradV3.Options... options)
scope
- current scopeyBackprop
- 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.reserveSpace1
- 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.reserveSpace2
- 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.reserveSpace3
- 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.options
- carries optional attributes valuespublic static FusedBatchNormGradV3.Options epsilon(Float epsilon)
epsilon
- A small float number added to the variance of x.public static FusedBatchNormGradV3.Options dataFormat(String dataFormat)
dataFormat
- The data format for y_backprop, x, x_backprop.
Either "NHWC" (default) or "NCHW".public static FusedBatchNormGradV3.Options isTraining(Boolean isTraining)
isTraining
- A bool value to indicate the operation is for training (default)
or inference.public Output<U> offsetBackprop()
public Output<U> reserveSpace4()
Copyright © 2022. All rights reserved.