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

Function AddN

tensorflow/go/op/wrappers.go:34426–34438  ·  view source on GitHub ↗

Add all input tensors element wise. Inputs must be of same size and shape. ```python x = [9, 7, 10] tf.math.add_n(x) ==> 26 ```

(scope *Scope, inputs []tf.Output)

Source from the content-addressed store, hash-verified

34424// tf.math.add_n(x) ==> 26
34425// ```
34426func AddN(scope *Scope, inputs []tf.Output) (sum tf.Output) {
34427 if scope.Err() != nil {
34428 return
34429 }
34430 opspec := tf.OpSpec{
34431 Type: "AddN",
34432 Input: []tf.Input{
34433 tf.OutputList(inputs),
34434 },
34435 }
34436 op := scope.AddOperation(opspec)
34437 return op.Output(0)
34438}
34439
34440// MatMulAttr is an optional argument to MatMul.
34441type MatMulAttr func(optionalAttr)

Callers 1

TestAddGradientsFunction · 0.70

Calls 3

ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 1

TestAddGradientsFunction · 0.56