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

Function should_run_eagerly

tensorflow/python/keras/testing_utils.py:311–318  ·  view source on GitHub ↗

Returns whether the models we are testing should be run eagerly.

()

Source from the content-addressed store, hash-verified

309
310
311def should_run_eagerly():
312 """Returns whether the models we are testing should be run eagerly."""
313 if _thread_local_data.run_eagerly is None:
314 raise ValueError('Cannot call `should_run_eagerly()` outside of a '
315 '`run_eagerly_scope()` or `run_all_keras_modes` '
316 'decorator.')
317
318 return _thread_local_data.run_eagerly and context.executing_eagerly()
319
320
321@tf_contextlib.contextmanager

Callers 1

layer_testFunction · 0.85

Calls 1

executing_eagerlyMethod · 0.80

Tested by

no test coverage detected