mirror of
https://github.com/vale981/ray
synced 2025-04-23 06:25:52 -04:00
[rllib] minor bug fix to shared model, model wasnt actually shared due to new scope (#1503)
This commit is contained in:
parent
d8850eac4b
commit
369773d3e8
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue