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

Function namescope

tensorflow/python/eager/context.py:1643–1651  ·  view source on GitHub ↗

ContextManager for creating hierarchical name scopes.

(name)

Source from the content-addressed store, hash-verified

1641# TODO(agarwal): get rid of this and use ops.name_scope instead.
1642@contextlib.contextmanager
1643def namescope(name):
1644 """ContextManager for creating hierarchical name scopes."""
1645 ctx = context()
1646 old_name = ctx.scope_name
1647 ctx.scope_name = "%s/%s" % (old_name, name) if old_name else name
1648 try:
1649 yield
1650 finally:
1651 ctx.scope_name = old_name
1652
1653
1654def scope_name():

Callers

nothing calls this directly

Calls 1

contextFunction · 0.85

Tested by

no test coverage detected