diff options
author | Olivia Nordquist <nolivia@google.com> | 2017-11-08 15:57:27 -0800 |
---|---|---|
committer | Andrew Selle <aselle@andyselle.com> | 2017-11-10 16:14:37 -0800 |
commit | f28ae398cc5b875b936ad6e5cd4d280928c38409 (patch) | |
tree | 4d9291b983f6540b51dbe2d04a4bcf9117694458 | |
parent | 64d2636e2946772d4b1531ec91b389110a2787b7 (diff) |
allows tf.Print to print empty data list and changes a noop test in function_test.py to verify that it doesn't raise a ValueError as an empty list would have previously
PiperOrigin-RevId: 175079527
-rw-r--r-- | tensorflow/core/ops/logging_ops.cc | 2 | ||||
-rw-r--r-- | tensorflow/python/framework/function_test.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/ops/logging_ops.cc b/tensorflow/core/ops/logging_ops.cc index 11cb9861a3..e6995821df 100644 --- a/tensorflow/core/ops/logging_ops.cc +++ b/tensorflow/core/ops/logging_ops.cc @@ -43,7 +43,7 @@ REGISTER_OP("Print") .Output("output: T") .SetIsStateful() .Attr("T: type") - .Attr("U: list(type)") + .Attr("U: list(type) >= 0") .Attr("message: string = ''") .Attr("first_n: int = -1") .Attr("summarize: int = 3") diff --git a/tensorflow/python/framework/function_test.py b/tensorflow/python/framework/function_test.py index 36b0737cfc..ba43e9199b 100644 --- a/tensorflow/python/framework/function_test.py +++ b/tensorflow/python/framework/function_test.py @@ -370,7 +370,7 @@ class FunctionTest(test.TestCase): @function.Defun(dtypes.float32) def Foo(x): - y = logging_ops.Print(x, [x], "Hello") + y = logging_ops.Print(x, [], "Hello") with ops.control_dependencies([y]): z = control_flow_ops.no_op() with ops.control_dependencies([z]): |