aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/go/tensor.go
diff options
context:
space:
mode:
authorGravatar Manjunath Kudlur <keveman@google.com>2017-07-21 10:18:08 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-21 10:22:30 -0700
commitfce5222dcf4d563a23055efeee89599dc36539c0 (patch)
tree931f01a084880e748eb1feb89fdf1bd2fe6b25d4 /tensorflow/go/tensor.go
parent8e059376b5d9bbce159d6de2af5307210209ff5c (diff)
Added DT_VARIANT type.
A tensor with DT_VARIANT type can store arbitrary C++ data structures. DT_VARIANT is implemented using a type-erased data structure similar to std::any, but with extensions to make it compatible with tensorflow::Tensor. In particular, Encode and Decode methods need to be provided by C++ classes whose objects are stored in Variant. PiperOrigin-RevId: 162754827
Diffstat (limited to 'tensorflow/go/tensor.go')
-rw-r--r--tensorflow/go/tensor.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/go/tensor.go b/tensorflow/go/tensor.go
index 4a60c736b5..8b8909a6f8 100644
--- a/tensorflow/go/tensor.go
+++ b/tensorflow/go/tensor.go
@@ -227,6 +227,7 @@ var types = []struct {
{reflect.TypeOf(uint16(0)), C.TF_UINT16},
{reflect.TypeOf(complex(float64(0), float64(0))), C.TF_COMPLEX128},
// TODO(apassos): support DT_RESOURCE representation in go.
+ // TODO(keveman): support DT_VARIANT representation in go.
}
// shapeAndDataTypeOf returns the data type and shape of the Tensor