mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-11-16 08:49:07 +00:00
Relax the HardTanh limit
This commit is contained in:
parent
a5c3418765
commit
84ebc3d7da
1 changed files with 1 additions and 1 deletions
|
|
@ -51,7 +51,7 @@ class Actor(BaseNetwork):
|
||||||
# Avoid saturation by limiting the mean of the gaussian to be in [-1, 1]
|
# 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.Tanh())
|
||||||
# TODO: test with small positive slope to have non zero gradient
|
# TODO: test with small positive slope to have non zero gradient
|
||||||
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=-3.0, max_val=3.0))
|
||||||
else:
|
else:
|
||||||
self.action_dist = SquashedDiagGaussianDistribution(action_dim)
|
self.action_dist = SquashedDiagGaussianDistribution(action_dim)
|
||||||
self.mu = nn.Linear(net_arch[-1], action_dim)
|
self.mu = nn.Linear(net_arch[-1], action_dim)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue