From a71328e06f6a408afdb1de6d6d020776559813dc Mon Sep 17 00:00:00 2001 From: HongDaSeon Date: Thu, 16 Jan 2020 15:11:28 +0900 Subject: [PATCH] action.clamp update prob Might not be a problem, but... --- ddpg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddpg.py b/ddpg.py index e867218..8681e45 100644 --- a/ddpg.py +++ b/ddpg.py @@ -97,7 +97,7 @@ def select_action(self, state): mu = self.eval_anet(state) dist = Normal(mu, torch.tensor(self.var, dtype=torch.float)) action = dist.sample() - action.clamp(-2.0, 2.0) + action = action.clamp(-2.0, 2.0) return (action.item(),) def save_param(self):