From 957da953f43b9b2a39fce73daf7daaaba916e9db Mon Sep 17 00:00:00 2001 From: Joaquin Rives Gambin <joaquin.j.rives@utu.fi> Date: Wed, 11 Mar 2020 00:17:31 +0200 Subject: [PATCH] model 5 --- draft_model_5.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/draft_model_5.py b/draft_model_5.py index 652b749b..4b8edc92 100644 --- a/draft_model_5.py +++ b/draft_model_5.py @@ -157,9 +157,6 @@ x = LSTM(units=200)(x) x = BatchNormalization()(x) output_lvl_1 = LeakyReLU(alpha=0.3)(x) -# x = LeakyReLU(alpha=0.3)(x) -# output_lvl_1 = Dense(20, activation='sigmoid')(x) - model_lvl_1 = Model(inputs=input_lvl_1, outputs=output_lvl_1) @@ -183,16 +180,17 @@ main_output = Dense(9, activation='sigmoid')(x) main_model = Model(inputs=main_input, outputs=main_output) main_model.summary() -try: - model = multi_gpu_model(main_model, gpus=4, cpu_relocation=False) - print("Training on 4 GPUs") -except: - print("Training on 1 GPU (or CPU)") +# try: +# model = multi_gpu_model(main_model, gpus=4, cpu_relocation=False) +# print("Training on 4 GPUs") +# except: +# print("Training on 1 GPU (or CPU)") main_model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['categorical_accuracy']) main_model.summary() +########################################################## main_model.fit(arr_seg_train, arr_labels_train, epochs=20, batch_size=24, verbose=1, validation_data=(arr_seg_test, arr_labels_test), shuffle=True) -- GitLab