Update question_classify_train.py

This commit is contained in:
liuhuanyong 2018-11-18 22:41:02 +08:00 committed by GitHub
parent 9729fa6958
commit c1b8befb44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()