From 5b31b843b1246e7009caf881cd97b8a28d43d49c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A1=90=E6=A1=90?= <32215330+dkqkxx@users.noreply.github.com> Date: Thu, 20 Jan 2022 23:53:19 +0800 Subject: [PATCH] Fix pcl_rl bugs (#10465) --- research/pcl_rl/controller.py | 4 ++-- research/pcl_rl/env_spec.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/research/pcl_rl/controller.py b/research/pcl_rl/controller.py index 39f0031b3..38d8dd2a9 100755 --- a/research/pcl_rl/controller.py +++ b/research/pcl_rl/controller.py @@ -204,8 +204,8 @@ class Controller(object): observations, actions, rewards, pads) = self._sample_episodes(sess, greedy=greedy) - observations = zip(*observations) - actions = zip(*actions) + observations = list(zip(*observations)) + actions = list(zip(*actions)) terminated = np.array(self.env.dones) diff --git a/research/pcl_rl/env_spec.py b/research/pcl_rl/env_spec.py index b95b00b9e..23c313fe8 100755 --- a/research/pcl_rl/env_spec.py +++ b/research/pcl_rl/env_spec.py @@ -175,7 +175,7 @@ class EnvSpec(object): if batched: return obs else: - return zip(*obs)[0] + return list(zip(*obs))[0] def initial_act(self, batch_size=None): batched = batch_size is not None @@ -191,7 +191,7 @@ class EnvSpec(object): if batched: return act else: - return zip(*act)[0] + return list(zip(*act))[0] def is_discrete(self, typ): return typ == spaces.discrete -- GitLab