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
For tensorflow 1.5 you can use tf.app.flags.FLAGS.flag_values_dict()
they have changed the flags library one more time
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With