Skip to content

Commit bc7ee05

Browse files
committed
worker name scope should have trailing backslash otherwise any worker 10-19 will clash in scope with worker 1, and so on.
1 parent 1f04c1d commit bc7ee05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PolicyGradient/a3c/worker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def __init__(self, name, env, policy_net, value_net, global_counter, discount_fa
8585
# Op to copy params from global policy/valuenets
8686
self.copy_params_op = make_copy_params_op(
8787
tf.contrib.slim.get_variables(scope="global", collection=tf.GraphKeys.TRAINABLE_VARIABLES),
88-
tf.contrib.slim.get_variables(scope=self.name, collection=tf.GraphKeys.TRAINABLE_VARIABLES))
88+
tf.contrib.slim.get_variables(scope=self.name+'/', collection=tf.GraphKeys.TRAINABLE_VARIABLES))
8989

9090
self.vnet_train_op = make_train_op(self.value_net, self.global_value_net)
9191
self.pnet_train_op = make_train_op(self.policy_net, self.global_policy_net)

0 commit comments

Comments
 (0)