Beispiel #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)
Beispiel #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)
Beispiel #3
0
 def testGraphIsReused(self):
   b1 = bookkeeper.for_default_graph()
   b2 = bookkeeper.for_default_graph()
   self.assertTrue(b1 is b2)
Beispiel #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)
Beispiel #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)
Beispiel #6
0
 def testGraphIsReused(self):
     b1 = bookkeeper.for_default_graph()
     b2 = bookkeeper.for_default_graph()
     self.assertTrue(b1 is b2)