What's the purpose of tf.app.flags in TensorFlow?

前端 未结 5 1617

I am reading some example codes in Tensorflow, I found following code

flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_float(\'learning_rate\', 0.01, \         


        
5条回答
  •  攒了一身酷
    2020-12-04 07:26

    At Google, they use flag systems to set default values for arguments. It's similar to argparse. They use their own flag system instead of argparse or sys.argv.

    Source: I worked there before.

提交回复
热议问题