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

Unable to train model #1

Open
abhinavrai44 opened this issue Jul 1, 2017 · 1 comment
Open

Unable to train model #1

abhinavrai44 opened this issue Jul 1, 2017 · 1 comment

Comments

@abhinavrai44
Copy link

On executing trpo_continous.py, I get the following error:

[2017-07-01 23:52:58,375] Making new env: CartPole-v0
[TL] InputLayer continous_shared/continous_input_layer: (?, 3)
[TL] DenseLayer continous_shared/continous_fc1: 64 relu
[TL] DenseLayer continous_shared/continous_fc2: 64 relu
[TL] DenseLayer continous_shared/continous_fc3: 1 relu

********** Iteration 0 ************
Traceback (most recent call last):
File "experiment/trpo_continous.py", line 62, in
agent.learn()
File "/home/abhinav/Desktop/major/parallel-trpo/RL_toolbox/RLToolbox/agent/TRPO_agent.py", line 80, in learn
stats , theta , thprev = self.train_mini_batch(linear_search=False)
File "/home/abhinav/Desktop/major/parallel-trpo/RL_toolbox/RLToolbox/algorithm/TRPO.py", line 62, in train_mini_batch
self.get_samples(self.pms.paths_number)
File "/home/abhinav/Desktop/major/parallel-trpo/RL_toolbox/RLToolbox/algorithm/TRPO.py", line 29, in get_samples
self.storage.get_single_path()
File "/home/abhinav/Desktop/major/parallel-trpo/RL_toolbox/RLToolbox/storage/storage_continous.py", line 36, in get_single_path
a, agent_info = self.agent.get_action(o)
File "/home/abhinav/Desktop/major/parallel-trpo/RL_toolbox/RLToolbox/algorithm/TRPO.py", line 43, in get_action
{self.net.obs: obs})
File "/home/abhinav/anaconda2/envs/osim/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 710, in run
run_metadata_ptr)
File "/home/abhinav/anaconda2/envs/osim/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 887, in _run
% (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (1, 4) for Tensor u'continous_shared/continous_obs:0', which has shape '(?, 3)'

@jjkke88
Copy link
Owner

jjkke88 commented Jul 12, 2017

it seems that the state shape you use is 4 but i know the carpole's state is 3 dimensions, maybe you use a high version of gym or wrong environment

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

2 participants