From 619122c4b77dae008d7a0db3a22568370fa30f2b Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Wed, 26 Sep 2018 21:18:40 +0800 Subject: [PATCH] make DQN runnable PYTHONPATH=/paddle/build/python python train.py --rom ./rom_files/pong.bin --alg DuelingDQN --- fluid/DeepQNetwork/DuelingDQN_agent.py | 3 ++- fluid/DeepQNetwork/atari.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fluid/DeepQNetwork/DuelingDQN_agent.py b/fluid/DeepQNetwork/DuelingDQN_agent.py index d6224ef3..271a767b 100644 --- a/fluid/DeepQNetwork/DuelingDQN_agent.py +++ b/fluid/DeepQNetwork/DuelingDQN_agent.py @@ -158,7 +158,8 @@ class DuelingDQNModel(object): for i, var in enumerate(policy_vars): sync_op = fluid.layers.assign(policy_vars[i], target_vars[i]) sync_ops.append(sync_op) - sync_program = sync_program.prune(sync_ops) + # The prune API is deprecated, please don't use it any more. + sync_program = sync_program._prune(sync_ops) return sync_program def act(self, state, train_or_test): diff --git a/fluid/DeepQNetwork/atari.py b/fluid/DeepQNetwork/atari.py index 46b75420..ec793cba 100644 --- a/fluid/DeepQNetwork/atari.py +++ b/fluid/DeepQNetwork/atari.py @@ -9,7 +9,7 @@ import gym from gym import spaces from gym.envs.atari.atari_env import ACTION_MEANING -from ale_python_interface import ALEInterface +from atari_py import ALEInterface __all__ = ['AtariPlayer'] -- GitLab