Closed mattiasmar closed 5 years ago
Hi, I met the same issue. How did you solve this? Thanks
This is how I defined it:
self.observation_space = spaces.Box(0, np.iinfo(np.int32).max,
shape=(self.observation_space_dim,),
dtype=float)
This code belongs to the init method of your environment.
You just replaced 34 with self.observation_space_dim, right? Then why does it solve the issue?
Unfortunately I don't remember what went wrong for me at the time. I have a weak memory that my observation_space_dim variable was not properly initialized. The error was not related to Coach per se and therefore I closed the issue myself.
An openai gym.env defines self.observation_space to
yet when using coach the below error is generated:
ValueError: Cannot feed value of shape (1, 34) for Tensor 'main_level/agent/main/online/network_0/observation/observation:0', which has shape '(?, 0)'
The state returned by the said gym.env is a numpy float array of length 34.