mirror of
https://github.com/saymrwulf/stable-baselines3.git
synced 2026-11-17 08:56:08 +00:00
LeakyClip not working yet
This commit is contained in:
parent
3a7508ac16
commit
57c890f3e9
1 changed files with 2 additions and 2 deletions
|
|
@ -76,9 +76,9 @@ class Actor(BaseNetwork):
|
||||||
log_std_init=log_std_init)
|
log_std_init=log_std_init)
|
||||||
# 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())
|
||||||
# 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
|
# Small positive slope to have non-zero gradient
|
||||||
self.mu = nn.Sequential(self.mu, LeakyClip())
|
# self.mu = nn.Sequential(self.mu, LeakyClip())
|
||||||
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