germain-hug / Deep-RL-Keras

Keras Implementation of popular Deep RL Algorithms (A3C, DDQN, DDPG, Dueling DDQN)
528 stars 149 forks source link

Testing A3C #13

Closed ndeshp2s closed 5 years ago

ndeshp2s commented 5 years ago

I tried testing the trained model on A3C on CartPole-v1 environment. However, I get the following error: "ValueError: Error when checking input: expected input_1 to have 3 dimensions, but got array with shape (4, 4)"

thaume commented 5 years ago

Hi @ndeshp2s, try changing the code in A3C/agent.py as follows :

# line 25, in reshape()
return np.expand_dims(x, axis=0)

It should work fine for CartPole-v1 after that ;)