diff options
author | Asim Shankar <ashankar@google.com> | 2017-02-16 16:28:34 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-02-16 16:47:36 -0800 |
commit | c35e3b523ae5ee4d557b624e24f1be0ee71edb66 (patch) | |
tree | 8b5cc3110bc4e5e77c3fd3274ddd9f5325964a10 /tensorflow/go/util_test.go | |
parent | 5cdf2afa5276f4d6b97ca7c6812661994d28957b (diff) |
Go: Add PartialRun support.
Change: 147783087
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 +} |