tf.flags.FLAGS何时开始从命令行解析参数?

时间:2019-04-17 07:44:21

标签: python tensorflow

tensorflow版本1.12
python eval.py --batch_size = 128

http://localhost:27017

输出错误:BATCH_SIZE = 64

FLAGS = tf.flags.FLAGS
tf.flags.DEFINE_integer("batch_size", 64, "Batch Size (default: 64)")
for attr, value in sorted(FLAGS.flag_values_dict().items()):
    print("{}={}".format(attr.upper(), value))

当我再添加一行“ FLAGS.batch_size”时,
输出正确:BATCH_SIZE = 128

0 个答案:

没有答案