diff options
author | Asim Shankar <ashankar@google.com> | 2016-11-21 11:24:53 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-11-21 11:44:14 -0800 |
commit | c80be35454a418c18b3fd57614bfcb5265274c33 (patch) | |
tree | 975b50379b742f7913eb6d2c14ab8fdfc552d22d /tensorflow/go/genop | |
parent | 074acf38d83bf4be1e3fe2bb813d4bf32b97c2ac (diff) |
Go: Support for String tensors.
And use this support to simplify the Inception example as it can use the
DecodeJpeg op.
Also fixed a bug in generated op functions - A TensorFlow "int"
is a Go "int64".
Another step in #10
Change: 139809489
Diffstat (limited to 'tensorflow/go/genop')
-rw-r--r-- | tensorflow/go/genop/internal/genop.go | 2 | ||||
-rw-r--r-- | tensorflow/go/genop/internal/genop_test.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/go/genop/internal/genop.go b/tensorflow/go/genop/internal/genop.go index 5d5aa26992..75c111e957 100644 --- a/tensorflow/go/genop/internal/genop.go +++ b/tensorflow/go/genop/internal/genop.go @@ -387,7 +387,7 @@ func goType(tfType string) (string, error) { var gotype string switch tfType { case "int": - gotype = "int" + gotype = "int64" case "float": gotype = "float32" case "bool": diff --git a/tensorflow/go/genop/internal/genop_test.go b/tensorflow/go/genop/internal/genop_test.go index b3bcd9db05..c3057e9119 100644 --- a/tensorflow/go/genop/internal/genop_test.go +++ b/tensorflow/go/genop/internal/genop_test.go @@ -188,7 +188,7 @@ type DecodeJpegAttr func(optionalAttr) // // value: Number of color channels for the decoded image. // If not specified, defaults to i:0 -func DecodeJpegChannels(value int) DecodeJpegAttr { +func DecodeJpegChannels(value int64) DecodeJpegAttr { return func(m optionalAttr) { m["channels"] = value } |