Skip to content

Commit

Permalink
Replace returns_to_go with rewards in TACR
Browse files Browse the repository at this point in the history
  • Loading branch information
takuseno committed Feb 16, 2025
1 parent 7086972 commit 3a916ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions d3rlpy/algos/transformer/torch/tacr_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def inner_predict(self, inpt: TorchTransformerInput) -> torch.Tensor:
action = self._modules.transformer(
inpt.observations,
inpt.actions,
inpt.returns_to_go,
inpt.rewards,
inpt.timesteps,
1 - inpt.masks,
)
Expand Down Expand Up @@ -128,7 +128,7 @@ def compute_actor_loss(
action = self._modules.transformer(
batch.observations,
batch.actions,
batch.returns_to_go,
batch.rewards,
batch.timesteps,
1 - batch.masks,
)
Expand Down Expand Up @@ -168,7 +168,7 @@ def compute_target(
action = self._modules.transformer(
batch.observations,
batch.actions,
batch.returns_to_go,
batch.rewards,
batch.timesteps,
1 - batch.masks,
)[:, :-1].reshape(-1, self._action_size)
Expand Down

0 comments on commit 3a916ef

Please sign in to comment.