MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / disable_eager_execution

Function disable_eager_execution

tensorflow/python/framework/ops.py:5803–5814  ·  view source on GitHub ↗

Disables eager execution. This function can only be called before any Graphs, Ops, or Tensors have been created. It can be used at the beginning of the program for complex migration projects from TensorFlow 1.x to 2.x.

()

Source from the content-addressed store, hash-verified

5801
5802@tf_export(v1=["disable_eager_execution"])
5803def disable_eager_execution():
5804 """Disables eager execution.
5805
5806 This function can only be called before any Graphs, Ops, or Tensors have been
5807 created. It can be used at the beginning of the program for complex migration
5808 projects from TensorFlow 1.x to 2.x.
5809 """
5810 _api_usage_gauge.get_cell().set(False)
5811 context.default_execution_mode = context.GRAPH_MODE
5812 c = context.context_safe()
5813 if c is not None:
5814 c._thread_local_data.is_eager = False # pylint: disable=protected-access
5815
5816
5817def enable_eager_execution_internal(config=None,

Callers

nothing calls this directly

Calls 2

setMethod · 0.45
get_cellMethod · 0.45

Tested by

no test coverage detected