What does global_step mean in tensorflow ?

global_step refers to the number of batches seen by the graph. Every time a batch is provided, the weights are updated in the direction that minimizes the loss. global_step just keeps track of the number of batches seen so far. When it is passed in the minimize() argument list, the variable is increased by one. Have a look at optimizer.minimize().

You can get the global_step value using tf.train.global_step(). Also handy are the utility methods tf.train.get_global_step or tf.train.get_or_create_global_step.

0 is the initial value of the global step in this context.
Answer from < maddin25 and martianwars >

global_step 指的是 graph 所看到的 batch 的数量. 如果 dataset 中包含100个数据, 而 batch_size 被设置为 10, 则每隔10个 batch 结束一个 epoch.
epoch 指的是遍历一遍 dataset.

发表评论

电子邮件地址不会被公开。 必填项已用*标注