stable-baselines: CustomEnv Observation Shape Error
I am running into small issue with my observation space shape
self.observation_space = spaces.Box(low=-np.inf, high=np.inf,shape=(6,),
dtype=np.float32)
What do i need to modify to fix this issue.
Error with check_env is
AssertionError: The observation returned by the reset()method does not match the given observation space
Without check_env
ValueError: Cannot feed value of shape (1, 14) for Tensor 'input/Ob:0', which has shape '(?, 6)'
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20
I had try
return np.array([0.0, 0.0])but not work. Butdtype=np.float64works.I guess it’s their ‘observation’? 😃
Thanks your tips, I found that add
dtypesolved, but why?Can I ask you what the OBS is exactly?
yes, you are right. I use np.pi, even though float32 doesn’t work, but float64 works.
Yes, but at line 9, the first
np.infis missing a “-” in front of it 😃