Skip to content

Commit fd3c58b

Browse files
committed
fixed bug with model which affected performance. Results should be improved
Former-commit-id: 12ea2fe
1 parent 336b1e8 commit fd3c58b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

DeepSlice/neural_network/neural_network.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ def initialise_network(xception_weights: str, weights: str) -> Sequential:
3939
base_model = Xception(include_top=True, weights=xception_weights)
4040
base_model._layers.pop()
4141
base_model._layers.pop()
42-
inputs = Input(shape=(299, 299, 3))
43-
base_model_layer = base_model(inputs, training=True)
44-
dense1_layer = Dense(256, activation="relu")(base_model_layer)
45-
dense2_layer = Dense(256, activation="relu")(dense1_layer)
46-
output_layer = Dense(9, activation="linear")(dense2_layer)
47-
model = Model(inputs=inputs, outputs=output_layer)
42+
model = Sequential()
43+
model.add(base_model)
44+
model.add(Dense(256, activation="relu"))
45+
model.add(Dense(256, activation="relu"))
46+
model.add(Dense(9, activation="linear"))
4847
if weights != None:
4948
model.load_weights(weights)
5049
return model

0 commit comments

Comments
 (0)