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

Method testGetNameScope

tensorflow/python/framework/ops_test.py:3353–3361  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3351 self.assertEqual(ep, ops.prepend_name_scope(striped, name_scope_to_add))
3352
3353 def testGetNameScope(self):
3354 with ops.Graph().as_default() as g:
3355 with ops.name_scope("scope1"):
3356 with ops.name_scope("scope2"):
3357 with ops.name_scope("scope3"):
3358 self.assertEqual("scope1/scope2/scope3", g.get_name_scope())
3359 self.assertEqual("scope1/scope2", g.get_name_scope())
3360 self.assertEqual("scope1", g.get_name_scope())
3361 self.assertEqual("", g.get_name_scope())
3362
3363 def testTwoGraphs(self):
3364

Callers

nothing calls this directly

Calls 4

get_name_scopeMethod · 0.80
as_defaultMethod · 0.45
GraphMethod · 0.45
name_scopeMethod · 0.45

Tested by

no test coverage detected