import tensorflow as tf
#定义flags变量
flags = tf.flags
FLAGS = flags.FLAGS
#定义变量里的值
flags.DEFINE_string("path","/data","data's path")
flags.DEFINE_double("money",20.0,"the value of money")
flags.DEFINE_integer("step",20,"training step")
flags.DEFINE_bool("Train",True,"train or not")
#使用变量里的值
FLAGS.path
FLAGS.step
#必须初始化的值,常放在main函数中
flags.mark_flag_as_required("path")
flags.mark_flag_as_required("step")
flags.mark_flag_as_required("train")