fix mock
This commit is contained in:
parent
995b1f64e5
commit
41ab83f691
@ -73,8 +73,10 @@ class MockEnv(Module):
|
||||
out = (state, reward)
|
||||
|
||||
if self.can_terminate:
|
||||
shape = (self.num_envs,) if self.vectorized else (1,)
|
||||
|
||||
terminate = (
|
||||
(torch.rand((self.num_envs)) < self.rand_terminate_prob) &
|
||||
(torch.rand(shape) < self.rand_terminate_prob) &
|
||||
(self._step > self.terminate_after_step)
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user