diff --git a/aeon/clustering/deep_learning/_ae_abgru.py b/aeon/clustering/deep_learning/_ae_abgru.py index 20a3281cfc..5638b2dc78 100644 --- a/aeon/clustering/deep_learning/_ae_abgru.py +++ b/aeon/clustering/deep_learning/_ae_abgru.py @@ -186,9 +186,7 @@ def build_model(self, input_shape, **kwargs): input_layer = tf.keras.layers.Input(input_shape, name="input layer") encoder_output = encoder(input_layer) decoder_output = decoder(encoder_output) - output_layer = tf.keras.layers.Reshape( - target_shape=input_shape, name="outputlayer" - )(decoder_output) + output_layer = decoder_output model = tf.keras.models.Model(inputs=input_layer, outputs=output_layer) diff --git a/aeon/clustering/deep_learning/_ae_bgru.py b/aeon/clustering/deep_learning/_ae_bgru.py index 340e12a4a3..8ea3db77d1 100644 --- a/aeon/clustering/deep_learning/_ae_bgru.py +++ b/aeon/clustering/deep_learning/_ae_bgru.py @@ -185,9 +185,7 @@ def build_model(self, input_shape, **kwargs): input_layer = tf.keras.layers.Input(input_shape, name="input layer") encoder_output = encoder(input_layer) decoder_output = decoder(encoder_output) - output_layer = tf.keras.layers.Reshape( - target_shape=input_shape, name="outputlayer" - )(decoder_output) + output_layer = decoder_output model = tf.keras.models.Model(inputs=input_layer, outputs=output_layer) diff --git a/aeon/clustering/deep_learning/_ae_dcnn.py b/aeon/clustering/deep_learning/_ae_dcnn.py index 825f1e03c4..75f8eacfbe 100644 --- a/aeon/clustering/deep_learning/_ae_dcnn.py +++ b/aeon/clustering/deep_learning/_ae_dcnn.py @@ -211,9 +211,7 @@ def build_model(self, input_shape, **kwargs): input_layer = tf.keras.layers.Input(input_shape, name="input layer") encoder_output = encoder(input_layer) decoder_output = decoder(encoder_output) - output_layer = tf.keras.layers.Reshape( - target_shape=input_shape, name="outputlayer" - )(decoder_output) + output_layer = decoder_output model = tf.keras.models.Model(inputs=input_layer, outputs=output_layer) diff --git a/aeon/clustering/deep_learning/_ae_drnn.py b/aeon/clustering/deep_learning/_ae_drnn.py index 63fbc80f7f..4491e12e25 100644 --- a/aeon/clustering/deep_learning/_ae_drnn.py +++ b/aeon/clustering/deep_learning/_ae_drnn.py @@ -215,9 +215,7 @@ def build_model(self, input_shape, **kwargs): input_layer = tf.keras.layers.Input(input_shape, name="input layer") encoder_output = encoder(input_layer) decoder_output = decoder(encoder_output) - output_layer = tf.keras.layers.Reshape( - target_shape=input_shape, name="outputlayer" - )(decoder_output) + output_layer = decoder_output model = tf.keras.models.Model(inputs=input_layer, outputs=output_layer) diff --git a/aeon/clustering/deep_learning/_ae_fcn.py b/aeon/clustering/deep_learning/_ae_fcn.py index 3105a3cda2..a37a7d40a1 100644 --- a/aeon/clustering/deep_learning/_ae_fcn.py +++ b/aeon/clustering/deep_learning/_ae_fcn.py @@ -232,9 +232,7 @@ def build_model(self, input_shape, **kwargs): input_layer = tf.keras.layers.Input(input_shape, name="input layer") encoder_output = encoder(input_layer) decoder_output = decoder(encoder_output) - output_layer = tf.keras.layers.Reshape( - target_shape=input_shape, name="outputlayer" - )(decoder_output) + output_layer = decoder_output model = tf.keras.models.Model(inputs=input_layer, outputs=output_layer) diff --git a/aeon/clustering/deep_learning/_ae_resnet.py b/aeon/clustering/deep_learning/_ae_resnet.py index 37bca73292..868e47d846 100644 --- a/aeon/clustering/deep_learning/_ae_resnet.py +++ b/aeon/clustering/deep_learning/_ae_resnet.py @@ -247,9 +247,7 @@ def build_model(self, input_shape, **kwargs): input_layer = tf.keras.layers.Input(input_shape, name="input layer") encoder_output = encoder(input_layer) decoder_output = decoder(encoder_output) - output_layer = tf.keras.layers.Reshape( - target_shape=input_shape, name="outputlayer" - )(decoder_output) + output_layer = decoder_output model = tf.keras.models.Model(inputs=input_layer, outputs=output_layer)