diff --git a/fluid/DeepQNetwork/DQN_agent.py b/fluid/DeepQNetwork/DQN_agent.py index b60a31938427ec4640eca626c22f86589110cd9d..07f902250c8dc6dc77d066d9a6e8c7f75252b74f 100644 --- a/fluid/DeepQNetwork/DQN_agent.py +++ b/fluid/DeepQNetwork/DQN_agent.py @@ -79,7 +79,6 @@ class DQNModel(object): policy_vars.sort(key=lambda x: x.name) target_vars.sort(key=lambda x: x.name) - self._sync_program = fluid.Program() with fluid.program_guard(self._sync_program): sync_ops = [] for i, var in enumerate(policy_vars): diff --git a/fluid/DeepQNetwork/DoubleDQN_agent.py b/fluid/DeepQNetwork/DoubleDQN_agent.py index 5beebffe4143fa8c7f913ae6bd8ea7a9ca67e87e..6d15c6b5631985508e83be03894ad8dacebc9207 100644 --- a/fluid/DeepQNetwork/DoubleDQN_agent.py +++ b/fluid/DeepQNetwork/DoubleDQN_agent.py @@ -86,7 +86,6 @@ class DoubleDQNModel(object): policy_vars.sort(key=lambda x: x.name) target_vars.sort(key=lambda x: x.name) - self._sync_program = fluid.Program() with fluid.program_guard(self._sync_program): sync_ops = [] for i, var in enumerate(policy_vars): diff --git a/fluid/DeepQNetwork/DuelingDQN_agent.py b/fluid/DeepQNetwork/DuelingDQN_agent.py index 58ac9e61f4db811519f4c4fe18bf08e789df48fe..bf165f76716efc99b37a4749f16ccee7f7ad09ff 100644 --- a/fluid/DeepQNetwork/DuelingDQN_agent.py +++ b/fluid/DeepQNetwork/DuelingDQN_agent.py @@ -79,7 +79,6 @@ class DuelingDQNModel(object): policy_vars.sort(key=lambda x: x.name) target_vars.sort(key=lambda x: x.name) - self._sync_program = fluid.Program() with fluid.program_guard(self._sync_program): sync_ops = [] for i, var in enumerate(policy_vars):