Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Jan 31, 2024
1 parent 03c201c commit 4b746f6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/a2c/utils_atari.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def make_ppo_modules_pixels(proof_environment):
num_outputs = proof_environment.action_spec.shape
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,
}

# Define input keys
Expand Down
4 changes: 2 additions & 2 deletions examples/a2c/utils_mujoco.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,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
2 changes: 1 addition & 1 deletion examples/bandits/dqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@
f"training reward {data['next', 'reward'].sum() / env.numel() : 4.4f}, "
f"loss {loss_val: 4.4f} (init: {init_loss: 4.4f})"
)
policy.step()
policy[1].step()
4 changes: 2 additions & 2 deletions examples/distributed/collectors/multi_nodes/ray_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
in_keys=["loc", "scale"],
distribution_class=TanhNormal,
distribution_kwargs={
"min": env.action_spec.space.minimum,
"max": env.action_spec.space.maximum,
"min": env.action_spec.space.low,
"max": env.action_spec.space.high,
},
return_log_prob=True,
)
Expand Down
4 changes: 2 additions & 2 deletions examples/iql/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ def make_iql_model(cfg, train_env, eval_env, device="cpu"):
spec=action_spec,
distribution_class=TanhNormal,
distribution_kwargs={
"min": action_spec.space.minimum,
"max": action_spec.space.maximum,
"min": action_spec.space.low,
"max": action_spec.space.high,
"tanh_loc": False,
},
default_interaction_type=ExplorationType.RANDOM,
Expand Down

0 comments on commit 4b746f6

Please sign in to comment.