Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
albertbou92 committed Nov 27, 2023
1 parent dfb24a2 commit 9a06db6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/a2c/a2c_mujoco.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ def main(cfg: "DictConfig"): # noqa: F821
pbar.update(data.numel())

# Get training rewards and lengths
episode_rewards = data["next", "episode_reward"][data["next", "terminated"]]
episode_rewards = data["next", "episode_reward"][data["next", "done"]]
if len(episode_rewards) > 0:
episode_length = data["next", "step_count"][data["next", "terminated"]]
episode_length = data["next", "step_count"][data["next", "done"]]
log_info.update(
{
"train/reward": episode_rewards.mean().item(),
Expand Down
4 changes: 2 additions & 2 deletions examples/ppo/utils_mujoco.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def make_ppo_models_state(proof_environment):
num_outputs = proof_environment.action_spec.shape[-1]
distribution_class = TanhNormal
distribution_kwargs = {
"min": proof_environment.action_spec.space.minimum,
"max": proof_environment.action_spec.space.maximum,
"min": proof_environment.action_spec.space.low,
"max": proof_environment.action_spec.space.high,
"tanh_loc": False,
}

Expand Down

0 comments on commit 9a06db6

Please sign in to comment.