Hi, I am trying to the following code just for a random benchmark
for i in range(20):
observation = self.env.reset()
for j in range(epochs):
state, reward, done, info = self.env.step(self.act())
self.env.render()
if done:
time.sleep(0.5)
break
The first pass is well but the second reset trigger that error:
RuntimeWarning: invalid value encountered in greater
self.joints_at_limit = np.count_nonzero(np.abs(j[0::2]) > 0.99)
because there is just NaN value in the array j. I precise that there is no error when I don't render it (when I comment self.env.render()). But I want to render it to get feedback when I will teach it to walk.
Anyone guys has a workaround or know what is going on ? I am trying to dig in the code but I couldn't get anything yet...
Hi, I am trying to the following code just for a random benchmark
The first pass is well but the second reset trigger that error:
because there is just NaN value in the array
j
. I precise that there is no error when I don't render it (when I commentself.env.render()
). But I want to render it to get feedback when I will teach it to walk.Anyone guys has a workaround or know what is going on ? I am trying to dig in the code but I couldn't get anything yet...