Skip to content

Commit

Permalink
Update train.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wushilian authored Oct 1, 2018
1 parent 6e83afa commit bdd3180
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
optimizer=tf.train.AdamOptimizer(cfg.learning_rate)
#optimizer = tf.train.MomentumOptimizer(learning_rate=cfg.learning_rate, momentum=cfg.momentum, use_nesterov=True)
update_ops = tf.get_collection(tf.GraphKeys.UPDATE_OPS)
train_op=optimizer.minimize(loss)
with tf.control_dependencies(update_ops):
train_op=optimizer.minimize(loss)
var_list = tf.trainable_variables()
g_list = tf.global_variables()
bn_moving_vars = [g for g in g_list if 'moving_mean' in g.name]
Expand Down

0 comments on commit bdd3180

Please sign in to comment.