From 0b8126f94917bcd3a42de0306e2fff310ea777df Mon Sep 17 00:00:00 2001 From: Peter Zhokhov Date: Fri, 9 Nov 2018 10:08:39 -0800 Subject: [PATCH] more un-mpying --- baselines/ppo2/model.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/baselines/ppo2/model.py b/baselines/ppo2/model.py index 6b48d97..2ce6344 100644 --- a/baselines/ppo2/model.py +++ b/baselines/ppo2/model.py @@ -124,8 +124,9 @@ class Model(object): if MPI is None or MPI.COMM_WORLD.Get_rank() == 0: initialize() - global_variables = tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, scope="") - sync_from_root(sess, global_variables) #pylint: disable=E1101 + else: + global_variables = tf.get_collection(tf.GraphKeys.GLOBAL_VARIABLES, scope="") + sync_from_root(sess, global_variables) #pylint: disable=E1101 def train(self, lr, cliprange, obs, returns, masks, actions, values, neglogpacs, states=None): # Here we calculate advantage A(s,a) = R + yV(s') - V(s)