keras-rl / keras-rl

Deep Reinforcement Learning for Keras.

Home Page:http://keras-rl.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dimension does not match for tuple space

jxiw opened this issue · comments

Suppose I have a observation space which is spaces.Tuple(spaces.Tuple([spaces.MultiDiscrete(), spaces.MultiDiscrete(), spaces.MultiDiscrete()]), spaces.Discrete(), spaces.MultiDiscrete()]).

And my observation_input is
observation_input = Input(shape=[3, 1, 1], name='observation_input')

Since my space is composed by 3 subspaces, and the first subspace is composed by three discrete subspaces.

Then I got the shape does not match error.

The shape obtained from state is (1, 1, 3), but required is [(None, 3, 1, 1)].

ValueError: Error when checking : expected flatten_1_input to have 4 dimensions, but got array with shape (1, 1, 3)

Any suggestions about this, thanks.

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.