From e4d4c48c7e31106c54b5ba6d38cb217dcfcb8db9 Mon Sep 17 00:00:00 2001
From: Felix Kleinert <f.kleinert@fz-juelich.de>
Date: Tue, 3 Aug 2021 10:22:50 +0200
Subject: [PATCH] mupdate setctorial test models

---
 mlair/model_modules/advanced_paddings.py |  2 +-
 mlair/model_modules/model_class.py       | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/mlair/model_modules/advanced_paddings.py b/mlair/model_modules/advanced_paddings.py
index f2fd4de9..3e64fa9a 100644
--- a/mlair/model_modules/advanced_paddings.py
+++ b/mlair/model_modules/advanced_paddings.py
@@ -20,7 +20,7 @@ class PadUtils:
     """Helper class for advanced padding."""
 
     @staticmethod
-    def get_padding_for_same(kernel_size: Tuple[int], strides: int = 1) -> Tuple[int]:
+    def get_padding_for_same(kernel_size: Tuple[int, int], strides: int = 1) -> Tuple[int]:
         """
         Calculate padding size to keep input and output dimensions equal for a given kernel size.
 
diff --git a/mlair/model_modules/model_class.py b/mlair/model_modules/model_class.py
index 7e0895fb..78314808 100644
--- a/mlair/model_modules/model_class.py
+++ b/mlair/model_modules/model_class.py
@@ -476,9 +476,9 @@ class MyLSTMModel(AbstractModelClass):
         super().__init__(input_shape[0], output_shape[0])
 
         # settings
-        self.dropout_rate = 0.4
+        self.dropout_rate = 0.1
         self.stateful = False
-        self.initial_lr = 1e-5
+        self.initial_lr = 1e-4
 
         # apply to model
         self.set_model()
@@ -487,9 +487,9 @@ class MyLSTMModel(AbstractModelClass):
 
     def set_model(self):
         x_input = keras.layers.Input(shape=self._input_shape)
-        x_in = keras.layers.LSTM(16, return_sequences=True, name="First_LSTM", dropout=self.dropout_rate, stateful=self.stateful)(x_input)
-        x_in = keras.layers.Dropout(self.dropout_rate)(x_in)
-        x_in = keras.layers.LSTM(16, name="Second_LSTM", dropout=self.dropout_rate, stateful=self.stateful)(x_in)
+        x_in = keras.layers.LSTM(16*2*2*2, return_sequences=True, name="First_LSTM", dropout=self.dropout_rate, stateful=self.stateful)(x_input)
+        # x_in = keras.layers.Dropout(self.dropout_rate)(x_in)
+        x_in = keras.layers.LSTM(16*2*2*2, name="Second_LSTM", dropout=self.dropout_rate, stateful=self.stateful)(x_in)
         out_main = keras.layers.Dense(self._output_shape, name='Output_Dense')(x_in)
         self.model = keras.Model(inputs=x_input, outputs=[out_main])
 
@@ -612,7 +612,7 @@ class MyCNNModelSect(AbstractModelClass):
         first_filters = 16
         pad_size1 = PadUtils.get_padding_for_same(first_kernel)
         
-        pool_kernel = (3,1)
+        pool_kernel = (3, 1)
         pad_size_pool = PadUtils.get_padding_for_same(pool_kernel)
         
         second_kernel = (3, 1)
-- 
GitLab