Skip to content

Commit aece353

Browse files
committed
Don't wrap env for eval
1 parent 6c41c26 commit aece353

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

PolicyGradient/a3c/train.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@
3434

3535
FLAGS = tf.flags.FLAGS
3636

37-
def make_env():
38-
return atari_helpers.AtariEnvWrapper(gym.envs.make(FLAGS.env))
37+
def make_env(wrap=True):
38+
env = gym.envs.make(FLAGS.env)
39+
if wrap:
40+
env = atari_helpers.AtariEnvWrapper(env)
41+
return env
3942

4043
# Depending on the game we may have a limited action space
4144
env_ = make_env()
@@ -102,7 +105,7 @@ def make_env():
102105
# Used to occasionally save videos for our policy net
103106
# and write episode rewards to Tensorboard
104107
pe = PolicyMonitor(
105-
env=make_env(),
108+
env=make_env(wrap=False),
106109
policy_net=policy_net,
107110
summary_writer=summary_writer,
108111
saver=saver)

0 commit comments

Comments
 (0)