Updated LeakyReLU to Tanh in hopes of improving performance

This commit is contained in:
Vasilis Valatsos 2024-04-02 15:17:41 +02:00
parent d9b7ee30be
commit ef78027ba7

View file

@ -59,11 +59,11 @@ class ActorNetwork(nn.Module):
self.actor = nn.Sequential( self.actor = nn.Sequential(
nn.Linear(input_dim, fc1_dims), nn.Linear(input_dim, fc1_dims),
nn.LeakyReLU(), nn.Tanh(),
nn.Linear(fc1_dims, fc2_dims), nn.Linear(fc1_dims, fc2_dims),
nn.LeakyReLU(), nn.Tanh(),
nn.Linear(fc1_dims, fc2_dims), nn.Linear(fc1_dims, fc2_dims),
nn.LeakyReLU(), nn.Tanh(),
nn.Linear(fc2_dims, output_dim), nn.Linear(fc2_dims, output_dim),
nn.Softmax(dim=-1) nn.Softmax(dim=-1)
) )
@ -99,19 +99,19 @@ class CriticNetwork(nn.Module):
self.critic = nn.Sequential( self.critic = nn.Sequential(
nn.Linear(input_dims, fc1_dims), nn.Linear(input_dims, fc1_dims),
nn.LeakyReLU(), nn.Tanh(),
nn.Linear(fc1_dims, fc2_dims), nn.Linear(fc1_dims, fc2_dims),
nn.LeakyReLU(), nn.Tanh(),
nn.Linear(fc1_dims, fc2_dims), nn.Linear(fc1_dims, fc2_dims),
nn.LeakyReLU(), nn.Tanh(),
nn.Linear(fc1_dims, fc2_dims), nn.Linear(fc1_dims, fc2_dims),
nn.LeakyReLU(), nn.Tanh(),
nn.Linear(fc1_dims, fc2_dims), nn.Linear(fc1_dims, fc2_dims),
nn.LeakyReLU(), nn.Tanh(),
nn.Linear(fc1_dims, fc2_dims), nn.Linear(fc1_dims, fc2_dims),
nn.LeakyReLU(), nn.Tanh(),
nn.Linear(fc1_dims, fc2_dims), nn.Linear(fc1_dims, fc2_dims),
nn.LeakyReLU(), nn.Tanh(),
nn.Linear(fc2_dims, 1) nn.Linear(fc2_dims, 1)
) )