From 93226f635c5c108b3b501d8bbcf27e64dec49fb9 Mon Sep 17 00:00:00 2001 From: Dan Moldovan Date: Wed, 10 Oct 2018 07:38:42 -0700 Subject: Use overloaded operators for the assert statement. This should remove the reliance on importing tensorflow in the generated code. PiperOrigin-RevId: 216528047 --- tensorflow/python/autograph/converters/asserts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tensorflow/python/autograph/converters/asserts.py') 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: -- cgit v1.2.3