【发布时间】:2017-12-23 01:34:42
【问题描述】:
我正在研究 tensorflow 中的mnist example。
我对模块 FLAGS 感到困惑
# Basic model parameters as external flags.
FLAGS = None
在“run_training”功能中:
def run_training():
"""Train MNIST for a number of steps."""
# Tell TensorFlow that the model will be built into the default Graph.
with tf.Graph().as_default():
# Input images and labels.
images, labels = inputs(train=True, batch_size=FLAGS.batch_size,
num_epochs=FLAGS.num_epochs)
这里使用“FLAGS.batch_size”和“FLAGS.num_epochs”的目的是什么?我可以把它换成一个像 128 这样的常数吗?
我在this site找到了类似的答案,但还是看不懂。
【问题讨论】:
-
您没有包含将
FLAGS定义为重要内容的代码。此外,您能解释一下您从其他问题中不明白的地方吗?
标签: python tensorflow deep-learning mnist