From ef78027ba722b676ead8a0eb2122cba1721b7cd5 Mon Sep 17 00:00:00 2001 From: Vasilis Valatsos Date: Tue, 2 Apr 2024 15:17:41 +0200 Subject: [PATCH] Updated LeakyReLU to Tanh in hopes of improving performance --- ml/ppo/brain.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ml/ppo/brain.py b/ml/ppo/brain.py index 75153da..3e8ddf7 100644 --- a/ml/ppo/brain.py +++ b/ml/ppo/brain.py @@ -59,11 +59,11 @@ class ActorNetwork(nn.Module): self.actor = nn.Sequential( nn.Linear(input_dim, fc1_dims), - nn.LeakyReLU(), + nn.Tanh(), nn.Linear(fc1_dims, fc2_dims), - nn.LeakyReLU(), + nn.Tanh(), nn.Linear(fc1_dims, fc2_dims), - nn.LeakyReLU(), + nn.Tanh(), nn.Linear(fc2_dims, output_dim), nn.Softmax(dim=-1) ) @@ -99,19 +99,19 @@ class CriticNetwork(nn.Module): self.critic = nn.Sequential( nn.Linear(input_dims, fc1_dims), - nn.LeakyReLU(), + nn.Tanh(), nn.Linear(fc1_dims, fc2_dims), - nn.LeakyReLU(), + nn.Tanh(), nn.Linear(fc1_dims, fc2_dims), - nn.LeakyReLU(), + nn.Tanh(), nn.Linear(fc1_dims, fc2_dims), - nn.LeakyReLU(), + nn.Tanh(), nn.Linear(fc1_dims, fc2_dims), - nn.LeakyReLU(), + nn.Tanh(), nn.Linear(fc1_dims, fc2_dims), - nn.LeakyReLU(), + nn.Tanh(), nn.Linear(fc1_dims, fc2_dims), - nn.LeakyReLU(), + nn.Tanh(), nn.Linear(fc2_dims, 1) )