Skip to content

Commit

Permalink
amend
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens committed Oct 11, 2024
1 parent 8aac458 commit 3e3a528
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion torchrl/objectives/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def init_(self) -> None:
"to True if it is not done by default. "
f"If no target parameter is needed, do not use a target updater such as {type(self)}."
)

# filter the target_ out
def filter_target(key):
if isinstance(key, tuple):
Expand Down Expand Up @@ -355,7 +356,7 @@ def __init__(
def _step(
self, p_source: Tensor | TensorDictBase, p_target: Tensor | TensorDictBase
) -> None:
p_target.data.mul_(self.eps).add_(p_source.data, (1 - self.eps))
p_target.data.lerp_(p_source.data, 1 - self.eps)


class HardUpdate(TargetNetUpdater):
Expand Down

0 comments on commit 3e3a528

Please sign in to comment.