Reputation: 1319
I am a new at tensorflow, and I have read some code from its website. I was wondering what is the FLAGS
means in the code?
for example, in line 78 of fully_connected_feed.py, the inputs are FLAGS.batch_size
, FLAGS.fake_data
. Then I read this in the definition of FLAGS
:
# Basic model parameters as external flags.
FLAGS = None
I was confused about this variable.
Upvotes: 0
Views: 51
Reputation: 6365
Is used to store command line parameters. Checkout these lines:
parser = argparse.ArgumentParser()
parser.add_argument(
'--learning_rate',
type=float,
default=0.01,
help='Initial learning rate.'
)
...
FLAGS, unparsed = parser.parse_known_args()
You can also see it lets you define default values and create a help description on the command line so others know what parameters accepts your cli without having to look at the code.
Upvotes: 2