Commit 5df14c66 authored by Dennis Willers's avatar Dennis Willers 🏀

Umbenennen in activation_function_2

parent e880a33e
......@@ -24,7 +24,7 @@ def run_cross_validation():
if optimization_method.name in config['knn']['exception_optimization_method']:
continue
for activation_function_2 in Aktivierungsfunktion:
if activation_function_2.name in config['knn']['exception_activation_funktion_1']:
if activation_function_2.name in config['knn']['exception_activation_funktion_2']:
continue
for activation_function_128 in Aktivierungsfunktion:
if check_if_kombination_is_not_allowed(
......@@ -38,7 +38,7 @@ def run_cross_validation():
r = 1
config_knn = ConfigKNN(
excluded_folder=Markt.Kein_Markt,
activation_function_1_units=activation_function_2,
activation_function_2_units=activation_function_2,
activation_function_128_units=activation_function_128,
optimization_method=optimization_method
)
......
......@@ -7,7 +7,7 @@ knn:
epochs: 10
exception_optimization_method:
['SGD']
exception_activation_funktion_1:
exception_activation_funktion_2:
['ReLU']
ignoreKnnCombinations:
[
......
......@@ -7,16 +7,16 @@ class ConfigKNN:
def __init__(self,
excluded_folder=Markt.Kein_Markt,
activation_function_128_units=Aktivierungsfunktion.ReLU,
activation_function_1_units=Aktivierungsfunktion.sigmoid,
activation_function_2_units=Aktivierungsfunktion.sigmoid,
optimization_method=Optimierungsverfahren.SGD):
self.excluded_folder = excluded_folder
self.activation_function_128_units = activation_function_128_units
self.activation_function_1_units = activation_function_1_units
self.activation_function_2_units = activation_function_2_units
self.optimization_method = optimization_method
def __str__(self):
return "optimization_method: " \
+ self.optimization_method.name + " - activation_function_128_units: " \
+ self.activation_function_128_units.name + ' - activation_function_1_units: ' \
+ self.activation_function_1_units.name + ' - excluded_folder: ' \
+ self.activation_function_128_units.name + ' - activation_function_2_units: ' \
+ self.activation_function_2_units.name + ' - excluded_folder: ' \
+ self.excluded_folder.name
......@@ -14,7 +14,7 @@ def define_model(config_knn):
# Die Fully-Connected-Schichten werden definiert
flat = tf.keras.layers.Flatten()(model.layers[-1].output)
output_layer_1 = get_next_layer(128, config_knn.activation_function_128_units, flat)
output_layer_2 = get_next_layer(2, config_knn.activation_function_1_units, output_layer_1)
output_layer_2 = get_next_layer(2, config_knn.activation_function_2_units, output_layer_1)
# Die Schichten des Modells werden definiert
model = tf.keras.models.Model(inputs=model.inputs, outputs=output_layer_2)
......
......@@ -25,7 +25,7 @@ def create_excel_result(worksheet, r, callback, config, config_knn, evaluate_met
r = r + 1
worksheet.cell(row=r, column=2).value = config_knn.optimization_method.name
worksheet.cell(row=r, column=3).value = config_knn.activation_function_128_units.name
worksheet.cell(row=r, column=4).value = config_knn.activation_function_1_units.name
worksheet.cell(row=r, column=4).value = config_knn.activation_function_2_units.name
worksheet.cell(row=r, column=5).value = config_knn.excluded_folder.name
r = r + 2
......@@ -148,7 +148,7 @@ def save_excel(workbook, config, config_knn):
now = datetime.now()
date_time = now.strftime("%d_%m_%y__%H_%M")
file_name = config_knn.optimization_method.name + "_" + \
config_knn.activation_function_1_units.name + "_" + \
config_knn.activation_function_2_units.name + "_" + \
config_knn.activation_function_128_units.name + "_" + date_time + ".xlsx"
# Speichern Sie die Arbeitsmappe
workbook.save(config["result"]["excel_path"] + file_name)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment