From c1b8befb44a0cd5e6f3f3779c8bbb3ad1240fedb Mon Sep 17 00:00:00 2001 From: liuhuanyong Date: Sun, 18 Nov 2018 22:41:02 +0800 Subject: [PATCH] Update question_classify_train.py --- question_classify_train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/question_classify_train.py b/question_classify_train.py index 8cf52c9..f8d9292 100644 --- a/question_classify_train.py +++ b/question_classify_train.py @@ -129,8 +129,8 @@ class QuestionClassify(object): model.add(Conv1D(128, 3, activation='relu')) model.add(GlobalAveragePooling1D()) model.add(Dropout(0.5)) - model.add(Dense(13, activation='sigmoid')) - model.compile(loss='binary_crossentropy', + model.add(Dense(13, activation='softmax')) + model.compile(loss='categorical_crossentropy', optimizer='rmsprop', metrics=['accuracy']) model.summary()