Commit 8543db08 authored by Yuxin Wu's avatar Yuxin Wu

[FasterRCNN] fix batchnorm in freeze mode

parent 1f881fcf
......@@ -160,7 +160,7 @@ def BatchNorm(x, use_local_stat=None, decay=0.9, epsilon=1e-5,
if ctx.is_main_training_tower:
add_model_variable(moving_mean)
add_model_variable(moving_var)
if use_local_stat:
if ctx.is_main_training_tower and use_local_stat:
ret = update_bn_ema(xn, batch_mean, batch_var, moving_mean, moving_var, decay)
else:
ret = tf.identity(xn, name='output')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment