aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/go/tensor.go
diff options
context:
space:
mode:
authorGravatar Manjunath Kudlur <keveman@google.com>2017-07-20 14:44:20 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-20 14:47:43 -0700
commit19cc9a796d86b5cf2193e7648ac9ae05c5efb53f (patch)
tree6966d04d3470d74844f188a209f1cb22026eae40 /tensorflow/go/tensor.go
parent5dbae025a1b61155883c2f3c868bed9e53000e09 (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: 162668355
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