# Supporting Dict observation spaces for ComplexInputNetwork model?

**URL:** <https://discuss.ray.io/t/supporting-dict-observation-spaces-for-complexinputnetwork-model/2569>\
**Category:** RLlib\
**Created:** [June 18, 2021, 2:05pm UTC](https://discuss.ray.io/t/supporting-dict-observation-spaces-for-complexinputnetwork-model/2569 "2021-06-18T14:05:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cwijesundara](https://avatars.discourse-cdn.com/v4/letter/c/5f9b8f/32.png) [@cwijesundara](https://discuss.ray.io/u/cwijesundara)\
**Post date:** [June 18, 2021, 2:05pm UTC](https://discuss.ray.io/t/supporting-dict-observation-spaces-for-complexinputnetwork-model/2569/1 "2021-06-18T14:05:01Z")

</div>

Hi there. I’m attempting to use a modified version of the ComplexInputNetwork ([ray/complex\_input\_net.py at aecc4c8d28c6fa1ac73c1d142fe5b9ee355410a4 · ray-project/ray · GitHub](https://github.com/ray-project/ray/blob/aecc4c8d28c6fa1ac73c1d142fe5b9ee355410a4/rllib/models/torch/complex_input_net.py#L19)), but I’m running into issues when trying to pass in a Dict observation space rather than a Tuple observation space. In particular, the issue is that when passing in a Dict observation space, the model errors out in the forward pass in the `catalog.py` file’s `get_action_space` function, because the action space has somehow been set to be the same as the observation space. When I pass the flattened observation space in instead (as is usually done with Rllib models) and set a breakpoint in the above function, the action space is set correctly to be the action space the model’s initialized with. Any ideas what the issue might be here?

---

<div class="post-metadata">

**Author:** ![mannyv](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/mannyv/32/606_2.png) [@mannyv](https://discuss.ray.io/u/mannyv)\
**Post date:** [June 18, 2021, 6:00pm UTC](https://discuss.ray.io/t/supporting-dict-observation-spaces-for-complexinputnetwork-model/2569/2 "2021-06-18T18:00:12Z")

</div>

Hi @cwijesundara,

Can you post the modified version you are using?
