diff options
author | Asim Shankar <ashankar@google.com> | 2017-01-20 10:34:19 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-01-20 10:48:54 -0800 |
commit | 8499dc1ee56b40a6e1f16ccbf3073a12523a0f58 (patch) | |
tree | 0e1579a56668c5bc8aeec42541a409e5fb5adee4 /tensorflow/go/tensor_test.go | |
parent | 1b71d25167236617e2085c1a90f5be3d942cb22b (diff) |
Go: Support DT_BOOL tensors.
Fixes #6969
Change: 145101014
Diffstat (limited to 'tensorflow/go/tensor_test.go')
-rw-r--r-- | tensorflow/go/tensor_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/go/tensor_test.go b/tensorflow/go/tensor_test.go index 2a3ed416bd..9a87923830 100644 --- a/tensorflow/go/tensor_test.go +++ b/tensorflow/go/tensor_test.go @@ -25,6 +25,7 @@ func TestNewTensor(t *testing.T) { shape []int64 value interface{} }{ + {nil, bool(true)}, {nil, int8(5)}, {nil, int16(5)}, {nil, int32(5)}, @@ -36,6 +37,7 @@ func TestNewTensor(t *testing.T) { {nil, complex(float32(5), float32(6))}, {nil, complex(float64(5), float64(6))}, {nil, "a string"}, + {[]int64{2}, []bool{true, false}}, {[]int64{1}, []float64{1}}, {[]int64{1}, [1]float64{1}}, {[]int64{2}, []string{"string", "slice"}}, @@ -105,6 +107,7 @@ func TestNewTensor(t *testing.T) { func TestTensorSerialization(t *testing.T) { var tests = []interface{}{ + bool(true), int8(5), int16(5), int32(5), @@ -123,6 +126,7 @@ func TestTensorSerialization(t *testing.T) { {{0, -1}, {-2, -3}, {-4, -5}}, {{-6, -7}, {-8, -9}, {-10, -11}}, }, + []bool{true, false, true}, } for _, v := range tests { t1, err := NewTensor(v) |