aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/autograph/converters/asserts.py
diff options
context:
space:
mode:
authorGravatar Dan Moldovan <mdan@google.com>2018-10-10 07:38:42 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-10 07:42:44 -0700
commit93226f635c5c108b3b501d8bbcf27e64dec49fb9 (patch)
tree0a703b3f99168dc3852c9961c874797827064e10 /tensorflow/python/autograph/converters/asserts.py
parente851764c24e5ac5f527a7ce2ce12050edddeb209 (diff)
Use overloaded operators for the assert statement. This should remove the reliance on importing tensorflow in the generated code.
PiperOrigin-RevId: 216528047
Diffstat (limited to 'tensorflow/python/autograph/converters/asserts.py')
-rw-r--r--tensorflow/python/autograph/converters/asserts.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/autograph/converters/asserts.py b/tensorflow/python/autograph/converters/asserts.py
index 56a97534c4..4ba827c35f 100644
--- a/tensorflow/python/autograph/converters/asserts.py
+++ b/tensorflow/python/autograph/converters/asserts.py
@@ -33,7 +33,7 @@ class AssertTransformer(converter.Base):
# Note: The lone tf.Assert call will be wrapped with control_dependencies
# by side_effect_guards.
template = """
- tf.Assert(test, (msg,))
+ ag__.assert_stmt(test, lambda: msg)
"""
if node.msg is None: