def sync_from_root(sess, variables, comm=None):
if comm is None: comm = MPI.COMM_WORLD<EOL>import tensorflow as tf<EOL>values = comm.bcast(sess.run(variables))<EOL>sess.run([tf.assign(var, val)<EOL>for (var, val) in zip(variables, values)])<EOL>
Send the root node's parameters to every worker.
Arguments:
  sess: the TensorFlow session.
  variables: all parameter variables including optimizer's