改网络的激活函数
This commit is contained in:
parent
3086413171
commit
db890f83cf
20
PPO2/PPO.py
20
PPO2/PPO.py
@ -48,17 +48,17 @@ class ActorCritic(nn.Module):
|
|||||||
if has_continuous_action_space :
|
if has_continuous_action_space :
|
||||||
self.actor = nn.Sequential(
|
self.actor = nn.Sequential(
|
||||||
nn.Linear(state_dim, 64),
|
nn.Linear(state_dim, 64),
|
||||||
nn.Tanh(),
|
# nn.Tanh(),
|
||||||
# nn.Sigmoid(),
|
# nn.Sigmoid(),
|
||||||
# nn.ReLU(),
|
nn.ReLU(),
|
||||||
nn.Linear(64, 64),
|
nn.Linear(64, 64),
|
||||||
nn.Tanh(),
|
# nn.Tanh(),
|
||||||
# nn.Sigmoid(),
|
# nn.Sigmoid(),
|
||||||
# nn.ReLU(),
|
nn.ReLU(),
|
||||||
nn.Linear(64, action_dim),
|
nn.Linear(64, action_dim),
|
||||||
nn.Tanh()
|
# nn.Tanh()
|
||||||
# nn.Sigmoid()
|
# nn.Sigmoid()
|
||||||
# nn.ReLU()
|
nn.ReLU()
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.actor = nn.Sequential(
|
self.actor = nn.Sequential(
|
||||||
@ -72,13 +72,13 @@ class ActorCritic(nn.Module):
|
|||||||
# critic
|
# critic
|
||||||
self.critic = nn.Sequential(
|
self.critic = nn.Sequential(
|
||||||
nn.Linear(state_dim, 64),
|
nn.Linear(state_dim, 64),
|
||||||
nn.Tanh(),
|
# nn.Tanh(),
|
||||||
# nn.Sigmoid(),
|
# nn.Sigmoid(),
|
||||||
# nn.ReLU(),
|
nn.ReLU(),
|
||||||
nn.Linear(64, 64),
|
nn.Linear(64, 64),
|
||||||
nn.Tanh(),
|
# nn.Tanh(),
|
||||||
# nn.Sigmoid(),
|
# nn.Sigmoid(),
|
||||||
# nn.ReLU(),
|
nn.ReLU(),
|
||||||
nn.Linear(64, 1)
|
nn.Linear(64, 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user