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] IQL compatibility with compile #2649

Merged
merged 38 commits into from
Dec 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update
[ghstack-poisoned]
vmoens committed Dec 15, 2024
commit 38ae5801ec3c1033c13f8a2e79533e4311101f16
2 changes: 1 addition & 1 deletion torchrl/objectives/iql.py
Original file line number Diff line number Diff line change
@@ -782,7 +782,7 @@ def actor_loss(self, tensordict: TensorDictBase) -> Tuple[Tensor, dict]:
# Min Q value
td_q = tensordict.select(*self.qvalue_network.in_keys, strict=False)
td_q = self._vmap_qvalue_networkN0(td_q, self.target_qvalue_network_params)
state_action_value = td_q.get(self.tensor_keys.chosen_state_action_value)
state_action_value = td_q.get(self.tensor_keys.state_action_value)
action = tensordict.get(self.tensor_keys.action)
if self.action_space == "categorical":
if action.shape != state_action_value.shape: