[go: nahoru, domu]

Skip to content

Commit

Permalink
Move control_flow_ops.Assert into its own file, `control_flow_asser…
Browse files Browse the repository at this point in the history
…t.py`, as a first step in removing circular dependencies with `control_flow_ops.cond`.

PiperOrigin-RevId: 513900896
  • Loading branch information
fionalang authored and tensorflower-gardener committed Mar 6, 2023
1 parent 2ba3762 commit 02c7f3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions tensorflow/python/saved_model/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ py_library(
"//tensorflow/core/function/capture:restore_captures",
"//tensorflow/python:array_ops",
"//tensorflow/python:constant_op",
"//tensorflow/python:control_flow_assert",
"//tensorflow/python:control_flow_ops",
"//tensorflow/python:dtypes",
"//tensorflow/python:errors",
Expand Down
3 changes: 2 additions & 1 deletion tensorflow/python/saved_model/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from tensorflow.python.framework import errors
from tensorflow.python.framework import ops
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import control_flow_assert
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import lookup_ops
from tensorflow.python.ops import resource_variable_ops
Expand Down Expand Up @@ -87,7 +88,7 @@ def _unused_handle():
"Try saving a tf.function with input_signature instead, and file a bug if"
" there are still issues.")

assert_op = control_flow_ops.Assert(
assert_op = control_flow_assert.Assert(
array_ops.placeholder_with_default(False, shape=()), [error_message])
if (not context.executing_eagerly()
) and ops.get_default_graph().building_function:
Expand Down

0 comments on commit 02c7f3f

Please sign in to comment.