Skip to content

Commit b65376e

Browse files
committed
Automated tutorials push
1 parent fc1dfc2 commit b65376e

File tree

201 files changed

+13133
-8518
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+13133
-8518
lines changed

_downloads/0c4dc681209d8c964aae9de5e477d280/pendulum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ def __init__(self, td_params=None, seed=None, device="cpu"):
604604
env,
605605
# ``Unsqueeze`` the observations that we will concatenate
606606
UnsqueezeTransform(
607-
unsqueeze_dim=-1,
607+
dim=-1,
608608
in_keys=["th", "thdot"],
609609
in_keys_inv=["th", "thdot"],
610610
),

_downloads/14b68b9764c79afe8ef88b11fc27bff7/dqn_with_rnn_tutorial.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@
433433
exploration_module.step(data.numel())
434434
updater.step()
435435

436-
with set_exploration_type(ExplorationType.MODE), torch.no_grad():
436+
with set_exploration_type(ExplorationType.DETERMINISTIC), torch.no_grad():
437437
rollout = env.rollout(10000, stoch_policy)
438438
traj_lens.append(rollout.get(("next", "step_count")).max().item())
439439

_downloads/224d2179034ef4c00cd9b86f2976062a/dqn_with_rnn_tutorial.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@
714714
" exploration_module.step(data.numel())\n",
715715
" updater.step()\n",
716716
"\n",
717-
" with set_exploration_type(ExplorationType.MODE), torch.no_grad():\n",
717+
" with set_exploration_type(ExplorationType.DETERMINISTIC), torch.no_grad():\n",
718718
" rollout = env.rollout(10000, stoch_policy)\n",
719719
" traj_lens.append(rollout.get((\"next\", \"step_count\")).max().item())"
720720
]

_downloads/4065a985b933a4377d3c7d93557e2282/reinforcement_ppo.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,8 @@
635635
" in_keys=[\"loc\", \"scale\"],\n",
636636
" distribution_class=TanhNormal,\n",
637637
" distribution_kwargs={\n",
638-
" \"min\": env.action_spec.space.low,\n",
639-
" \"max\": env.action_spec.space.high,\n",
638+
" \"low\": env.action_spec.space.low,\n",
639+
" \"high\": env.action_spec.space.high,\n",
640640
" },\n",
641641
" return_log_prob=True,\n",
642642
" # we'll need the log-prob for the numerator of the importance weights\n",

_downloads/592c87306513ba042d759e142b59fea4/coding_ddpg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ def make_recorder(actor_model_explore, transform_state_dict, record_interval):
893893
record_frames=1000,
894894
policy_exploration=actor_model_explore,
895895
environment=environment,
896-
exploration_type=ExplorationType.MEAN,
896+
exploration_type=ExplorationType.DETERMINISTIC,
897897
record_interval=record_interval,
898898
)
899899
return recorder_obj

_downloads/7ed508ed54ec36ee5c1d3fa1e8ceede0/reinforcement_ppo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@
419419
in_keys=["loc", "scale"],
420420
distribution_class=TanhNormal,
421421
distribution_kwargs={
422-
"min": env.action_spec.space.low,
423-
"max": env.action_spec.space.high,
422+
"low": env.action_spec.space.low,
423+
"high": env.action_spec.space.high,
424424
},
425425
return_log_prob=True,
426426
# we'll need the log-prob for the numerator of the importance weights

_downloads/8016e5cfa285bd92b9684c45552fffcc/pendulum.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@
769769
" env,\n",
770770
" # ``Unsqueeze`` the observations that we will concatenate\n",
771771
" UnsqueezeTransform(\n",
772-
" unsqueeze_dim=-1,\n",
772+
" dim=-1,\n",
773773
" in_keys=[\"th\", \"thdot\"],\n",
774774
" in_keys_inv=[\"th\", \"thdot\"],\n",
775775
" ),\n",

_downloads/e9ea08c1c8bbc809d69c69a6043d56ee/coding_ddpg.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@
12031203
" record_frames=1000,\n",
12041204
" policy_exploration=actor_model_explore,\n",
12051205
" environment=environment,\n",
1206-
" exploration_type=ExplorationType.MEAN,\n",
1206+
" exploration_type=ExplorationType.DETERMINISTIC,\n",
12071207
" record_interval=record_interval,\n",
12081208
" )\n",
12091209
" return recorder_obj"
-136 Bytes
Loading
-284 Bytes
Loading

0 commit comments

Comments
 (0)