Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError while executing act_and_train in TRPO #224

Open
mcmips opened this issue Aug 21, 2020 · 1 comment
Open

ValueError while executing act_and_train in TRPO #224

mcmips opened this issue Aug 21, 2020 · 1 comment

Comments

@mcmips
Copy link

mcmips commented Aug 21, 2020

Traceback (most recent call last):
File "TRPO.py", line 169, in
action = agent.act_and_train(obs, reward)
File "C:\Anaconda3\envs\osim-rl2\lib\site-packages\chainerrl\agents\trpo.py", line 680, in act_and_train
b_state = self.obs_normalizer(b_state, update=False)
File "C:\Anaconda3\envs\osim-rl2\lib\site-packages\chainerrl\links\empirical_normalization.py", line 93, in call
mean = xp.broadcast_to(self._mean, x.shape)
File "<array_function internals>", line 6, in broadcast_to
File "C:\Anaconda3\envs\osim-rl2\lib\site-packages\numpy\lib\stride_tricks.py", line 180, in broadcast_to
return _broadcast_to(array, shape, subok=subok, readonly=True)
File "C:\Anaconda3\envs\osim-rl2\lib\site-packages\numpy\lib\stride_tricks.py", line 125, in _broadcast_to
op_flags=['readonly'], itershape=shape, order='C')
ValueError: operands could not be broadcast together with remapped shapes [original->remapped]: (1,158) and requested shape (1,160)

please help.. any hints are welcome..

length of obs returned me 160, so i assume req shape is (1,160)

I see that
obs_space = env.observation_space
returns a space size of (158)

@mcmips mcmips closed this as completed Aug 21, 2020
@mcmips mcmips reopened this Oct 1, 2020
@mcmips
Copy link
Author

mcmips commented Oct 1, 2020

any hints, how can i fix this while using google colab for this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant