def testUniqueBookkeeperPerGraph(self): b1 = bookkeeper.for_default_graph() with tf.Graph().as_default(): b2 = bookkeeper.for_default_graph() self.assertFalse(b1 is b2)
def testPassingArgsCausesError(self): b1 = bookkeeper.for_new_graph() with b1.g.as_default(), self.assertRaises(ValueError): bookkeeper.for_default_graph(global_step=None)
def testGraphIsReused(self): b1 = bookkeeper.for_default_graph() b2 = bookkeeper.for_default_graph() self.assertTrue(b1 is b2)