diff options
author | Asim Shankar <ashankar@google.com> | 2017-02-09 09:31:08 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-02-09 09:47:35 -0800 |
commit | edc4dd62615b7e1ee7906f35099ed2e0a7d0a8ef (patch) | |
tree | fe65a41b23d9aedef5c68be5873b2665eec0d39c /tensorflow/go/operation.go | |
parent | 78be42e00ec29e507edbf92014709dc1b7ee6a38 (diff) |
Go: Add Output.DataType()
Change: 147043532
Diffstat (limited to 'tensorflow/go/operation.go')
-rw-r--r-- | tensorflow/go/operation.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/go/operation.go b/tensorflow/go/operation.go index df41c40a2b..9c035e5e18 100644 --- a/tensorflow/go/operation.go +++ b/tensorflow/go/operation.go @@ -75,6 +75,11 @@ type Output struct { Index int } +// DataType returns the type of elements in the tensor produced by p. +func (p Output) DataType() DataType { + return DataType(C.TF_OperationOutputType(p.c())) +} + // Shape returns the (possibly incomplete) shape of the tensor produced p. func (p Output) Shape() Shape { status := newStatus() |