aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/op_def_builder.h
diff options
context:
space:
mode:
authorGravatar Eugene Brevdo <ebrevdo@google.com>2017-09-08 09:06:20 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-09-08 09:10:00 -0700
commit7565452930582d02bb03e316d7acb8a7ca709c8c (patch)
treec6613aa99c8ac31d2edc4c7e76151c129f73276a /tensorflow/core/framework/op_def_builder.h
parentc0525d348f617ebf46a72dea2e370f8fb5dca0fa (diff)
TF OpDefBuilder: support compound types when using tuple restrictions.
Can now use type restrictions of the form 'attr("T: {numbertype, bool, string}")'. PiperOrigin-RevId: 168003571
Diffstat (limited to 'tensorflow/core/framework/op_def_builder.h')
-rw-r--r--tensorflow/core/framework/op_def_builder.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/core/framework/op_def_builder.h b/tensorflow/core/framework/op_def_builder.h
index 0d492208d4..0c91d271b7 100644
--- a/tensorflow/core/framework/op_def_builder.h
+++ b/tensorflow/core/framework/op_def_builder.h
@@ -57,8 +57,10 @@ class OpDefBuilder {
// (by convention only using capital letters for attrs that can be inferred)
// <type> can be:
// "string", "int", "float", "bool", "type", "shape", or "tensor"
- // "numbertype", "realnumbertype", "quantizedtype", "{int32,int64}"
+ // "numbertype", "realnumbertype", "quantizedtype"
// (meaning "type" with a restriction on valid values)
+ // "{int32,int64}" or {realnumbertype,quantizedtype,string}"
+ // (meaning "type" with a restriction containing unions of value types)
// "{\"foo\", \"bar\n baz\"}", or "{'foo', 'bar\n baz'}"
// (meaning "string" with a restriction on valid values)
// "list(string)", ..., "list(tensor)", "list(numbertype)", ...