mirror of
https://github.com/wassname/ray.git
synced 2026-06-30 17:41:35 +08:00
[rllib] minor bug fix to shared model, model wasnt actually shared due to new scope (#1503)
This commit is contained in:
committed by
Eric Liang
parent
d8850eac4b
commit
369773d3e8
@@ -31,7 +31,8 @@ class MultiAgentFullyConnectedNetwork(Model):
|
||||
reuse = tf.AUTO_REUSE if shared_model else False
|
||||
outputs = []
|
||||
for i in range(len(hiddens)):
|
||||
with tf.variable_scope("multi{}".format(i), reuse=reuse):
|
||||
scope = "multi" if shared_model else "multi{}".format(i)
|
||||
with tf.variable_scope(scope, reuse=reuse):
|
||||
sub_options = options.copy()
|
||||
sub_options.update({"fcnet_hiddens": hiddens[i]})
|
||||
# TODO(ev) make this support arbitrary networks
|
||||
|
||||
Reference in New Issue
Block a user