mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 13:37:39 +08:00
Fix Tuple spaces in rollout.py (#5332)
Make sure that the initial action is also properly flattened.
This commit is contained in:
committed by
Eric Liang
parent
e218e615df
commit
b3c8091a35
@@ -132,7 +132,7 @@ def rollout(agent, env_name, num_steps, out=None, no_render=True):
|
||||
state_init = {p: m.get_initial_state() for p, m in policy_map.items()}
|
||||
use_lstm = {p: len(s) > 0 for p, s in state_init.items()}
|
||||
action_init = {
|
||||
p: m.action_space.sample()
|
||||
p: _flatten_action(m.action_space.sample())
|
||||
for p, m in policy_map.items()
|
||||
}
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user