From 57c890f3e9f1b16f2d0e83d813ebaff79d58c018 Mon Sep 17 00:00:00 2001 From: Antonin RAFFIN Date: Sun, 22 Dec 2019 14:38:30 +0100 Subject: [PATCH] LeakyClip not working yet --- torchy_baselines/sac/policies.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchy_baselines/sac/policies.py b/torchy_baselines/sac/policies.py index 9de90e6..bc5fbcf 100644 --- a/torchy_baselines/sac/policies.py +++ b/torchy_baselines/sac/policies.py @@ -76,9 +76,9 @@ class Actor(BaseNetwork): log_std_init=log_std_init) # Avoid saturation by limiting the mean of the gaussian to be in [-1, 1] # self.mu = nn.Sequential(self.mu, nn.Tanh()) - # self.mu = nn.Sequential(self.mu, nn.Hardtanh(min_val=-2.0, max_val=2.0)) + self.mu = nn.Sequential(self.mu, nn.Hardtanh(min_val=-2.0, max_val=2.0)) # Small positive slope to have non-zero gradient - self.mu = nn.Sequential(self.mu, LeakyClip()) + # self.mu = nn.Sequential(self.mu, LeakyClip()) else: self.action_dist = SquashedDiagGaussianDistribution(action_dim) self.mu = nn.Linear(net_arch[-1], action_dim)