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

前端 未结 5 1615

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:28

    After trying many times I found this to print all FLAGS key as well as actual value -

    for key in tf.app.flags.FLAGS.flag_values_dict():
    
      print(key, FLAGS[key].value)
    

提交回复
热议问题