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

PPO test fail Cannot feed value of shape #17

Open
Wouter1 opened this issue Jun 3, 2020 · 1 comment
Open

PPO test fail Cannot feed value of shape #17

Wouter1 opened this issue Jun 3, 2020 · 1 comment

Comments

@Wouter1
Copy link
Collaborator

Wouter1 commented Jun 3, 2020

Trying to feed env.action_space and env.observation_space into BasicComplexAgent.
Now I get one test ok and one test fail:

ERROR: test_PPO_agent (test.testSumoGymAdapter.testSumoGymAdapter)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/wouter/git/aiagents/test/testSumoGymAdapter.py", line 65, in test_PPO_agent
    experiment.run()
  File "/home/wouter/git/aienvs/aienvs/runners/Experiment.py", line 58, in run
    episodeSteps, episodeReward = episode.run()
  File "/home/wouter/git/aienvs/aienvs/runners/Episode.py", line 51, in run
    obs, globalReward, done = self.step(obs, globalReward, done)
  File "/home/wouter/git/aienvs/aienvs/runners/Episode.py", line 32, in step
    actions = self._agent.step(obs, globalReward, done)
  File "/home/wouter/git/aiagents/aiagents/multi/BasicComplexAgent.py", line 17, in step
    agentActions = agentComponent.step(state, reward, done)
  File "/home/wouter/git/aiagents/aiagents/single/PPO/PPOAgent.py", line 110, in step
    self._action_output = self._get_action(self._step_output)
  File "/home/wouter/git/aiagents/aiagents/single/PPO/PPOAgent.py", line 236, in _get_action
    step_output['prev_action']))
  File "/home/wouter/git/aiagents/aiagents/single/PPO/PPO.py", line 114, in evaluate_policy
    feed_dict=feed_dict)
  File "/home/wouter/git/aienvs/venv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 950, in run
    run_metadata_ptr)
  File "/home/wouter/git/aienvs/venv/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1149, in _run
    str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (1, 14, 7, 2) for Tensor 'observation:0', which has shape '(?, 14, 14, 1)'

@Wouter1 Wouter1 mentioned this issue Jun 3, 2020
@Wouter1
Copy link
Collaborator Author

Wouter1 commented Jun 3, 2020

Alex wrote

It seems that there is some config misalignment between the agent and the environment for this test.

@Wouter1 Wouter1 mentioned this issue Jun 8, 2020
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