network predicts 2 by 2 classes, refactored threshold to main

This commit is contained in:
2017-06-30 18:43:50 +02:00
parent 8334e9a84f
commit c972963a19
4 changed files with 24 additions and 22 deletions

View File

@@ -45,9 +45,9 @@ def get_top_cnn(cnn, numFeatures, maxLen, windowSize, domainFeatures, filters, k
maxPool = GlobalMaxPooling1D()(cnn)
cnnDropout = Dropout(cnnDropout)(maxPool)
cnnDense = Dense(cnnHiddenDims, activation='relu')(cnnDropout)
cnnOutput = Dense(2, activation='softmax')(cnnDense)
cnnOutput1 = Dense(2, activation='softmax')(cnnDense)
cnnOutput2 = Dense(2, activation='softmax')(cnnDense)
# We define a trainable model linking the
# tweet inputs to the predictions
model = Model(inputs=inputList, outputs=cnnOutput)
return model
return Model(inputs=inputList, outputs=(cnnOutput1, cnnOutput2))