From 0b26c6125c2ed499785d9d594acd187c60f94032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Knaebel?= Date: Fri, 6 Oct 2017 16:36:58 +0200 Subject: [PATCH] fix flat 2 model bug caused by changing input layer --- arguments.py | 2 +- models/flat_2.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arguments.py b/arguments.py index c336487..5ef1f7d 100644 --- a/arguments.py +++ b/arguments.py @@ -35,7 +35,7 @@ parser.add_argument("--type", action="store", dest="model_type", default="final") # inter, final, staggered parser.add_argument("--depth", action="store", dest="model_depth", - default="small") # small, medium + default="flat1") # small, medium parser.add_argument("--model_output", action="store", dest="model_output", default="both") diff --git a/models/flat_2.py b/models/flat_2.py index 9953210..2136fe6 100644 --- a/models/flat_2.py +++ b/models/flat_2.py @@ -41,9 +41,9 @@ def get_model(cnnDropout, flow_features, domain_features, window_size, domain_le ipt_domains = Input(shape=(window_size, domain_length), name="ipt_domains") encoded = TimeDistributed(cnn, name="domain_cnn")(ipt_domains) ipt_flows = Input(shape=(window_size, flow_features), name="ipt_flows") - ipt_flows = BatchNormalization()(ipt_flows) - ipt_flows = Dense(dense_dim, activation=selu)(ipt_flows) - merged = keras.layers.concatenate([encoded, ipt_flows], -1) + y = BatchNormalization()(ipt_flows) + y = Dense(dense_dim, activation=selu)(y) + merged = keras.layers.concatenate([encoded, y], -1) # CNN processing a small slides of flow windows y = Conv1D(cnn_dims, kernel_size,