openai / spinningup

An educational resource to help anyone learn deep reinforcement learning.
https://spinningup.openai.com/
MIT License
9.99k stars 2.2k forks source link

DDPG training error #58

Closed tharaldyo closed 5 years ago

tharaldyo commented 5 years ago

When attempting to train a DDPG agent in a Pendulum-v0 environment, I ran into this error:

Traceback (most recent call last): File "/path/to/spinningup/spinup/utils/run_entrypoint.py", line 11, in <module> thunk() File "/path/to/spinningup/spinup/utils/run_utils.py", line 162, in thunk_plus thunk(**kwargs) File "/path/to/spinningup/spinup/algos/ddpg/ddpg.py", line 224, in ddpg replay_buffer.store(o, a, r, o2, d) File "/path/to/spinningup/spinup/algos/ddpg/ddpg.py", line 25, in store self.obs2_buf[self.ptr] = next_obs ValueError: could not broadcast input array from shape (3,1) into shape (3)

The command I used was

python -m spinup.run ddpg --env Pendulum-v0 --exp_name ddpgtest

Python version is Python 3.6.7.

tharaldyo commented 5 years ago

Fixed by 07bb73954e141d2542c92160255b89f15e54a1e6.

Thanks!