Tensorflow API: FLAGS

What is FLAGS

https://www.tensorflow.org/api_docs/python/tf/flags

$ python file.py --[parameter_name]

$ python file.py --help

How to use

# Create a flag for definition
flags = tf.app.flags

# Create a flag for reference
FLAGS = flags.FLAGS

# Definition of string
 flags.DEFINE_string (constant name, initial value, description)

# Definition of float
 flags.DEFINE_float (constant name, initial value, description)

# definition of int
 flags.DEFINE_integer (constant name, initial value, description)

# Definition of bool
 flags.DEFINE_boolean (constant name, initial value, description)

# Constant reference
 print (FLAGS. Constant name)

Recommended Posts

Tensorflow API: FLAGS
Tensorflow API: tf.truncated_normal
Tensorflow API: tf.reverse
TensorFlow API memo
[TF] About Tensorflow API
TensorFlow API memo (Python)
Logo detection using TensorFlow Object Detection API
Tensorflow Glossary
tensorflow mnist_deep.py
TensorFlow tutorial tutorial
Find polynomial approximations using TensorFlow 2.x Low-level API