Exemplo n.º 1
0
 def testInitializePartition(self):
   if test_util.is_xla_enabled():
     self.skipTest(
         "XLA ignores seeds for RandomNormal, skip xla-enabled test.")
   init = init_ops_v2.RandomNormal(0, 7, seed=1)
   self._partition_test(init)
Exemplo n.º 2
0
 def testDuplicatedInitializer(self):
   init = init_ops_v2.RandomNormal(0.0, 1.0)
   self._duplicated_test(init)
Exemplo n.º 3
0
 def testInitializerIdentical(self):
   self.skipTest("Doesn't work without the graphs")
   init1 = init_ops_v2.RandomNormal(0, 7, seed=1)
   init2 = init_ops_v2.RandomNormal(0, 7, seed=1)
   self._identical_test(init1, init2, True)
Exemplo n.º 4
0
 def testInitializerDifferent(self):
   init1 = init_ops_v2.RandomNormal(0, 7, seed=1)
   init2 = init_ops_v2.RandomNormal(0, 7, seed=2)
   self._identical_test(init1, init2, False)
Exemplo n.º 5
0
 def testRangeInitializer(self):
   self._range_test(
       init_ops_v2.RandomNormal(mean=0, stddev=1, seed=153),
       shape=(8, 12, 99),
       target_mean=0.,
       target_std=1)