From 9a7d8c1ecabe2974990782f8fe08a2f3e43060a2 Mon Sep 17 00:00:00 2001 From: naoto Date: Mon, 15 Jan 2024 06:38:17 +0900 Subject: [PATCH] Clarified that return_preds were unnecessary There is no need to get return_preds in foward method, so I replaced the return_preds with _ variable. --- gym/decision_transformer/models/decision_transformer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gym/decision_transformer/models/decision_transformer.py b/gym/decision_transformer/models/decision_transformer.py index f76f8f3b..2b63722e 100644 --- a/gym/decision_transformer/models/decision_transformer.py +++ b/gym/decision_transformer/models/decision_transformer.py @@ -134,7 +134,7 @@ def get_action(self, states, actions, rewards, returns_to_go, timesteps, **kwarg else: attention_mask = None - _, action_preds, return_preds = self.forward( + _, action_preds, _ = self.forward( states, actions, None, returns_to_go, timesteps, attention_mask=attention_mask, **kwargs) return action_preds[0,-1]