Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] LSTMModule #1084

Merged
merged 20 commits into from
Apr 24, 2023
Prev Previous commit
Next Next commit
amend
  • Loading branch information
vmoens committed Apr 24, 2023
commit 0720b8f22241a8466774996472fa669ce6f88226
6 changes: 3 additions & 3 deletions tutorials/sphinx-tutorials/dqn_with_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@
)
stoch_policy.step(data.numel())
updater.step()
with set_exploration_type(ExplorationType.MODE):
rollout = env.rollout(10000, stoch_policy)
traj_lens.append(rollout.get(("next", "step_count")).max().item())

if i % 50 == 0:
with set_exploration_type(ExplorationType.MODE):
rollout = env.rollout(10000, stoch_policy)
traj_lens.append(rollout.get(("next", "step_count")).max().item())
print(f"Executed {len(traj_lens)} trajectories with step counts {traj_lens}")

print(f"Executed {len(traj_lens)} trajectories with step counts {traj_lens}")