variable_averages = tf.train.ExponentialMovingAverage(mnist_train.MOVING_AVERAGE_DECAY)
variable_to_restore = variable_averages.variables_to_restore()
saver = tf.train.Saver(variable_to_restore)
variables_to_restore函数,是TensorFlow为滑动平均值提供。
详细解释请参照:https://www.jb51.net/article/144690.htm