Skip to content
Snippets Groups Projects
Commit ad811eef authored by v.gramlich1's avatar v.gramlich1
Browse files

Add model classes IntelliO3_ts_architecture_finetune_all_dense,...

Add model classes IntelliO3_ts_architecture_finetune_all_dense, IntelliO3_ts_architecture_finetune_outputs and IntelliO3_ts_architecture_finetune_main_output
parent 9ab23560
No related branches found
No related tags found
1 merge request!302Draft: Resolve "Class-based Oversampling technique"
Pipeline #77539 passed with warnings
...@@ -465,7 +465,7 @@ class IntelliO3_ts_architecture(AbstractModelClass): ...@@ -465,7 +465,7 @@ class IntelliO3_ts_architecture(AbstractModelClass):
"loss_weights": [.01, .99] "loss_weights": [.01, .99]
} }
class IntelliO3_ts_architecture_freeze(IntelliO3_ts_architecture): class IntelliO3_ts_architecture_finetune_all_dense(IntelliO3_ts_architecture):
def __init__(self, input_shape: list, output_shape: list): def __init__(self, input_shape: list, output_shape: list):
super().__init__(input_shape, output_shape) super().__init__(input_shape, output_shape)
...@@ -478,10 +478,31 @@ class IntelliO3_ts_architecture_freeze(IntelliO3_ts_architecture): ...@@ -478,10 +478,31 @@ class IntelliO3_ts_architecture_freeze(IntelliO3_ts_architecture):
for layer in self.model.layers: for layer in self.model.layers:
if not isinstance(layer, keras.layers.core.Dense): if not isinstance(layer, keras.layers.core.Dense):
layer.trainable = False layer.trainable = False
'''
class IntelliO3_ts_architecture_finetune_outputs(IntelliO3_ts_architecture):
def __init__(self, input_shape: list, output_shape: list):
super().__init__(input_shape, output_shape)
self.freeze_layers()
self.initial_lr = 1e-5
self.apply_to_model()
# self.lr_decay = None
def freeze_layers(self): def freeze_layers(self):
for layer in self.model.layers: for layer in self.model.layers:
if layer.name not in ["minor_1_out_Dense", "Main_out_Dense"]: if layer.name not in ["minor_1_out_Dense", "Main_out_Dense"]:
layer.trainable = False layer.trainable = False
'''
\ No newline at end of file class IntelliO3_ts_architecture_finetune_main_output(IntelliO3_ts_architecture):
def __init__(self, input_shape: list, output_shape: list):
super().__init__(input_shape, output_shape)
self.freeze_layers()
self.initial_lr = 1e-5
self.apply_to_model()
# self.lr_decay = None
def freeze_layers(self):
for layer in self.model.layers:
if layer.name not in ["Main_out_Dense"]:
layer.trainable = False
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment