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

Method nested

tensorflow/python/kernel_tests/template_test.py:314–321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

312 def test_internal_variable_reuse(self):
313
314 def nested():
315 with variable_scope.variable_scope("nested") as vs:
316 v1 = variable_scope.get_variable(
317 "x", initializer=init_ops.zeros_initializer(), shape=[])
318 with variable_scope.variable_scope(vs, reuse=True):
319 v2 = variable_scope.get_variable("x")
320 self.assertIs(v1, v2)
321 return v1
322
323 tmpl1 = template.make_template("s1", nested)
324 tmpl2 = template.make_template("s1", nested)

Callers 2

decoratedFunction · 0.80

Calls 2

variable_scopeMethod · 0.80
get_variableMethod · 0.45

Tested by

no test coverage detected