1. MovingAverage
我以前以为的是只有loss需要做Moveing Average, 如下面这个做Moving Average的例子
# Compute the moving average of all individual losses and the total loss.
loss_averages = tf.train.ExponentialMovingAverage(0.9, name='avg')
但是,其实不是的,我认为的是不对的。
1.2 对trainable variables进行moving averages
variable_averages = tf.train.ExponentialMovingAverage(moving_average_decay, global_step)
# 意思是:已经定义了一个可以进行ExponentialMovingAverage的object.但是,还没用这类对象对应的方法。
variables_averages_op = variable_averages.apply(tf.trainable_variables()) # 这才用了方法,这才有了真正的variable averages的操作。
返回的东西:(Returns)
If no summaries were collected, returns None. Otherwise returns a scalar Tensor of type string containing the serialized Summary protocol buffer resulting from the merging. 是字符串描述的一系列Summary protocol buffer(描述了具体怎么合并,合并了哪些个!).