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

Method testSetGlobalSeed

tensorflow/python/eager/context_test.py:32–38  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30class ContextTest(test.TestCase):
31
32 def testSetGlobalSeed(self):
33 c = context.Context()
34 c._set_global_seed(123)
35 for t in [np.int32, np.int64, np.uint32, np.uint64]:
36 c._set_global_seed(t(123))
37 c._set_global_seed(np.array(123, dtype=t))
38 c._set_global_seed(ops.convert_to_tensor(123, dtype=t))
39
40 def testContextIsDestroyedAfterTensors(self):
41 # Create a new context

Callers

nothing calls this directly

Calls 2

_set_global_seedMethod · 0.95
ContextMethod · 0.45

Tested by

no test coverage detected