Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vmoens committed Dec 15, 2024
2 parents 459ce5f + 3c8da3f commit 0634dfd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions sota-implementations/iql/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,10 @@ def make_iql_model(cfg, train_env, eval_env, device="cpu"):
model = torch.nn.ModuleList([actor, qvalue, value_net]).to(device)
# init nets
with torch.no_grad(), set_exploration_type(ExplorationType.RANDOM):
td = eval_env.reset()
td = eval_env.fake_tensordict()
td = td.to(device)
for net in model:
net(td)
del td
eval_env.close()

return model

Expand Down Expand Up @@ -358,7 +356,6 @@ def make_discrete_iql_model(cfg, train_env, eval_env, device):
td = td.to(device)
for net in model:
net(td)
eval_env.close()

return model

Expand Down

0 comments on commit 0634dfd

Please sign in to comment.