MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / FusedBatchNormV3

Function FusedBatchNormV3

tensorflow/go/op/wrappers.go:12050–12067  ·  view source on GitHub ↗

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. Arguments: x: A 4D Tensor for input data. scale: A 1D Tensor for scaling factor, to scale the normalized x. offset: A 1D Tensor for off

(scope *Scope, x tf.Output, scale tf.Output, offset tf.Output, mean tf.Output, variance tf.Output, optional ...FusedBatchNormV3Attr)

Source from the content-addressed store, hash-verified

12048// in the cuDNN case), to be reused in the gradient computation.A 1D Tensor for some intermediate results, to be reused in the gradient
12049// computation for better efficiency.
12050func FusedBatchNormV3(scope *Scope, x tf.Output, scale tf.Output, offset tf.Output, mean tf.Output, variance tf.Output, optional ...FusedBatchNormV3Attr) (y tf.Output, batch_mean tf.Output, batch_variance tf.Output, reserve_space_1 tf.Output, reserve_space_2 tf.Output, reserve_space_3 tf.Output) {
12051 if scope.Err() != nil {
12052 return
12053 }
12054 attrs := map[string]interface{}{}
12055 for _, a := range optional {
12056 a(attrs)
12057 }
12058 opspec := tf.OpSpec{
12059 Type: "FusedBatchNormV3",
12060 Input: []tf.Input{
12061 x, scale, offset, mean, variance,
12062 },
12063 Attrs: attrs,
12064 }
12065 op := scope.AddOperation(opspec)
12066 return op.Output(0), op.Output(1), op.Output(2), op.Output(3), op.Output(4), op.Output(5)
12067}
12068
12069// FusedBatchNormV2Attr is an optional argument to FusedBatchNormV2.
12070type FusedBatchNormV2Attr func(optionalAttr)

Callers 2

TEST_FFunction · 0.85
RunFusedBatchNormMethod · 0.85

Calls 4

aClass · 0.85
ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 2

TEST_FFunction · 0.68
RunFusedBatchNormMethod · 0.68