from absl import flags
#或者直接用
#import tensorflow as tf
#flags = tf.app.flags
#参数:参数名,默认值,描述
flags.DEFINE_string(
'model_dir', None, 'Path to output model directory '
'where event and checkpoint files will be written.')
flags.DEFINE_integer('num_train_steps', None, 'Number of train steps.')
flags.DEFINE_boolean(
'run_once', False, 'If running in eval-only mode, whether to run just '
'one round of eval vs running continuously (default).'
)
FLAGS = flags.FLAGS
#调用方法 FLAGS.run_once