title: tf.control_dependencies(tf.get_collection(tf.GraphKeys.UPDATE_OPS)) in tensorflow
body: <p>What is purpose of <code>tf.control_dependencies(tf.get_collection(tf.GraphKeys.UPDATE_OPS))</code> in tensorflow?</p>
  
  <p>With more context:</p>
  
  <pre><code>    optimizer = tf.train.AdamOptimizer(FLAGS.learning_rate)
      with tf.control_dependencies(tf.get_collection(tf.GraphKeys.UPDATE_OPS)):
          train_op = optimizer.minimize(loss_fn, var_list=tf.trainable_variables())
  </code></pre>