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

Method test_variables

tensorflow/python/saved_model/load_test.py:105–113  ·  view source on GitHub ↗
(self, cycles)

Source from the content-addressed store, hash-verified

103 self.assertIsNot(imported.dep_one, imported.dep_two)
104
105 def test_variables(self, cycles):
106 root = tracking.AutoTrackable()
107 root.v1 = variables.Variable(1., trainable=True)
108 root.v2 = variables.Variable(2., trainable=False)
109 imported = cycle(root, cycles)
110 self.assertEqual(imported.v1.numpy(), 1.0)
111 self.assertTrue(imported.v1.trainable)
112 self.assertEqual(imported.v2.numpy(), 2.0)
113 self.assertFalse(imported.v2.trainable)
114
115 def test_variables_name(self, cycles):
116 root = tracking.AutoTrackable()

Callers

nothing calls this directly

Calls 3

cycleFunction · 0.85
VariableMethod · 0.80
numpyMethod · 0.45

Tested by

no test coverage detected