Implementing batch normalization in tensorflow where the graph is run multiple times before updating batch norm moving averages

时光怂恿深爱的人放手 提交于 2019-12-11 15:50:25

问题


I have a feed forward network with batch normalization layers in it. the network has to be run multiple times before one backpropogation can be applied. It is used to compute:

a. vanilla logits (vl)

b. logits with noisy inputs (nl)

difference between vl and nl is also part of the cost function

I cant understand how and when to run tf.GraphKeys.UPDATE_OPS. If i run it typically by grouping it with optimizer i think the moving averages will be updated with mean and standard deviation of noisy batches since that is the last run of the network but i need the updates based on vanilla (no noise) run of the network. I can't change the order of different runs of the network as noise is computed using the output of vanilla run of the network

来源:https://stackoverflow.com/questions/57449318/implementing-batch-normalization-in-tensorflow-where-the-graph-is-run-multiple-t

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!