We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6909a47 commit cd277d4Copy full SHA for cd277d4
rsl_rl/modules/actor_critic_recurrent.py
@@ -95,5 +95,7 @@ def forward(self, input, masks=None, hidden_states=None):
95
96
def reset(self, dones=None):
97
# When the RNN is an LSTM, self.hidden_states_a is a list with hidden_state and cell_state
98
+ if self.hidden_states is None:
99
+ return
100
for hidden_state in self.hidden_states:
- hidden_state[..., dones, :] = 0.0
101
+ hidden_state[..., dones == 1] = 0.0
0 commit comments