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

Method foo

tensorflow/python/framework/ops_test.py:2726–2733  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2724 def testPreservesNameScopeInEagerExecution(self):
2725 with context.eager_mode():
2726 def foo():
2727 with ops.name_scope("inner"), ops.init_scope():
2728 if context.executing_eagerly():
2729 # A trailing slash is always appended when eager execution is
2730 # enabled.
2731 self.assertEqual(context.context().scope_name, "inner/")
2732 else:
2733 self.assertEqual(ops.get_name_scope(), "inner")
2734
2735 foo()
2736 self.assertEqual(ops.get_name_scope(), "")

Callers

nothing calls this directly

Calls 4

executing_eagerlyMethod · 0.80
get_name_scopeMethod · 0.80
name_scopeMethod · 0.45
contextMethod · 0.45

Tested by

no test coverage detected