Fork me on GitHub

Tensorflow中实现BN为什么需要加入这个额外依赖?见CS231N作业源码

batch normalization in tensorflow requires this extra dependency

为什么加上这两句?

extra_update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
with tf.control_dependencies(extra_update_ops):
train_step = optimizer.minimize(mean_loss)

posted @ 2017-12-19 14:19  郭耀华  阅读(1018)  评论(0编辑  收藏  举报