python example tf.flags - What's the purpose of in TensorFlow?

1 Answers

When you use, you can transfer the variable very conveniently between threads using See this for further usage of

tutorial list

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

flags =
flags.DEFINE_float('learning_rate', 0.01, 'Initial learning rate.')
flags.DEFINE_integer('max_steps', 2000, 'Number of steps to run trainer.')
flags.DEFINE_integer('hidden1', 128, 'Number of units in hidden layer 1.')
flags.DEFINE_integer('hidden2', 32, 'Number of units in hidden layer 2.')
flags.DEFINE_integer('batch_size', 100, 'Batch size.  '
                 'Must divide evenly into the dataset sizes.')
flags.DEFINE_string('train_dir', 'data', 'Directory to put the training data.')
flags.DEFINE_boolean('fake_data', False, 'If true, uses fake data '
                 'for unit testing.')

in tensorflow/tensorflow/g3doc/tutorials/mnist/

But I can't find any docs about this usage of

And I found the implementation of this flags is in the tensorflow/tensorflow/python/platform/default/

Obviously, this is somehow used to configure a network, so why is it not in the API docs? Can anyone explain what is going on here?