How to access all flags and get their values using loop in Tensorflow?
python, tensorflow
Solution
Looking at the source, it appears the API doesn't support it directly. If you need a hack, you can use `tf.flags.FLAGS.__flags` to get the dictionary.
Problem
I want to write all flags and its values in external file(like txt). How can I get automatically all the contents inside `tf.flag`? is there any built-in function? or is there easy way e.g. by using loop? for example, ``` tf.flags.DEFINE_string("device","/gpu:0", "select device") tf.flags.DEFINE_integer("rnn_size","64", "number of units") ``` I want to get ``` device /gpu:0 rnn_size 64 ```