Exemplo n.º 1
0
 def testUniqueBookkeeperPerGraph(self):
   b1 = bookkeeper.for_default_graph()
   with tf.Graph().as_default():
     b2 = bookkeeper.for_default_graph()
   self.assertFalse(b1 is b2)
Exemplo n.º 2
0
 def testPassingArgsCausesError(self):
   b1 = bookkeeper.for_new_graph()
   with b1.g.as_default(), self.assertRaises(ValueError):
     bookkeeper.for_default_graph(global_step=None)
Exemplo n.º 3
0
 def testGraphIsReused(self):
   b1 = bookkeeper.for_default_graph()
   b2 = bookkeeper.for_default_graph()
   self.assertTrue(b1 is b2)
Exemplo n.º 4
0
 def testUniqueBookkeeperPerGraph(self):
     b1 = bookkeeper.for_default_graph()
     with tf.Graph().as_default():
         b2 = bookkeeper.for_default_graph()
     self.assertFalse(b1 is b2)
Exemplo n.º 5
0
 def testPassingArgsCausesError(self):
     b1 = bookkeeper.for_new_graph()
     with b1.g.as_default(), self.assertRaises(ValueError):
         bookkeeper.for_default_graph(global_step=None)
Exemplo n.º 6
0
 def testGraphIsReused(self):
     b1 = bookkeeper.for_default_graph()
     b2 = bookkeeper.for_default_graph()
     self.assertTrue(b1 is b2)