diff options
Diffstat (limited to 'tensorflow/go/util_test.go')
-rw-r--r-- | tensorflow/go/util_test.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tensorflow/go/util_test.go b/tensorflow/go/util_test.go index 8ab365c656..492c3b1e8b 100644 --- a/tensorflow/go/util_test.go +++ b/tensorflow/go/util_test.go @@ -46,9 +46,18 @@ func Const(g *Graph, name string, value interface{}) (Output, error) { func Neg(g *Graph, name string, port Output) (Output, error) { op, err := g.AddOperation(OpSpec{ - Type: "Neg", - Name: name, + Type: "Neg", + Name: name, Input: []Input{port}, }) return op.Output(0), err } + +func Add(g *Graph, name string, x, y Output) (Output, error) { + op, err := g.AddOperation(OpSpec{ + Type: "Add", + Name: name, + Input: []Input{x, y}, + }) + return op.Output(0), err +} |