Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rsl_rl/algorithms/ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def broadcast_parameters(self) -> None:
self.actor.load_state_dict(model_params[0])
self.critic.load_state_dict(model_params[1])
if self.rnd:
self.rnd.predictor.load_state_dict(model_params[1])
self.rnd.predictor.load_state_dict(model_params[2])

def reduce_parameters(self) -> None:
"""Collect gradients from all GPUs and average them.
Expand Down
4 changes: 2 additions & 2 deletions rsl_rl/models/cnn_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ def get_latent(
latent_1d = super().get_latent(obs)
# Process 2D observation groups with CNNs
latent_cnn_list = [self.cnns[obs_group](obs[obs_group]) for obs_group in self.obs_groups_2d]
latend_cnn = torch.cat(latent_cnn_list, dim=-1)
latent_cnn = torch.cat(latent_cnn_list, dim=-1)
# Concatenate 1D and CNN latents
return torch.cat([latent_1d, latend_cnn], dim=-1)
return torch.cat([latent_1d, latent_cnn], dim=-1)

def as_jit(self) -> nn.Module:
"""Return a version of the model compatible with Torch JIT export."""
Expand Down
2 changes: 1 addition & 1 deletion rsl_rl/modules/rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def reset(self, dones: torch.Tensor | None = None, hidden_state: HiddenState = N
else:
self.hidden_state[..., dones == 1, :] = 0.0
else:
NotImplementedError(
raise NotImplementedError(
"Resetting the hidden state of done environments with a custom hidden state is not implemented"
)

Expand Down