Tensorflow
ph
- amazing examples : TensorFlow Examples by aymericdamien
tf.app.run()
How does tf.app.run() work?질문의 답 중에,
Tensorflow has some builtin command line flag handling mechanism. You can define your flags like tf.flags.DEFINE_integer('batch_size', 128, 'Number of images to process in a batch.')
and then if you use tf.app.run()
it will set things up so that you can globally access the passed values of the flags you defined, like tf.flags.FLAGS.batch_size
from wherever you need it in your code. #