diff options
author | 2017-01-17 14:04:20 -0800 | |
---|---|---|
committer | 2017-01-17 14:31:05 -0800 | |
commit | f8d75baaf4c92e76837de6bb64adccf8127a21d6 (patch) | |
tree | d3328471307fc541a14a95e8878d5cd9d32f24ab /tensorflow/go/operation_test.go | |
parent | 0662eabf9d6d670bd9a741ea3a3eb0c9f0005850 (diff) |
Go: Support setting shape valued attributes.
Fixes #6833
Change: 144752893
Diffstat (limited to 'tensorflow/go/operation_test.go')
-rw-r--r-- | tensorflow/go/operation_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tensorflow/go/operation_test.go b/tensorflow/go/operation_test.go index 8080515ee9..4c4c960448 100644 --- a/tensorflow/go/operation_test.go +++ b/tensorflow/go/operation_test.go @@ -81,6 +81,21 @@ func TestOperationOutputListSize(t *testing.T) { } } +func TestOperationShapeAttribute(t *testing.T) { + g := NewGraph() + _, err := g.AddOperation(OpSpec{ + Type: "Placeholder", + Attrs: map[string]interface{}{ + "dtype": Float, + "shape": MakeShape(-1, 3), + }, + }) + if err != nil { + t.Fatal(err) + } + // If and when the API to get attributes is added, check that here. +} + func TestOutputShape(t *testing.T) { graph := NewGraph() testdata := []struct { |