Fix double clip

This commit is contained in:
Antonin RAFFIN 2019-12-22 13:56:30 +01:00
parent f6c475a44b
commit 3a7508ac16

View file

@ -76,7 +76,7 @@ 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())
else: