def _setup(self):
    'Sets up and resets flags before each test.'
    tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.DEBUG)
    if (KerasBenchmark.local_flags is None):
        for flag_method in self.flag_methods:
            flag_method()
        flags.FLAGS(['foo'])
        for (k, v) in self.default_flags.items():
            setattr(FLAGS, k, v)
        saved_flag_values = flagsaver.save_flag_values()
        KerasBenchmark.local_flags = saved_flag_values
    else:
        flagsaver.restore_flag_values(KerasBenchmark.local_flags)
Sets up and resets flags before each test.
def _setup(self):
    
    tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.DEBUG)
    if (KerasBenchmark.local_flags is None):
        for flag_method in self.flag_methods:
            flag_method()
        flags.FLAGS(['foo'])
        for (k, v) in self.default_flags.items():
            setattr(FLAGS, k, v)
        saved_flag_values = flagsaver.save_flag_values()
        KerasBenchmark.local_flags = saved_flag_values
    else:
        flagsaver.restore_flag_values(KerasBenchmark.local_flags)