Skip to content

Instantly share code, notes, and snippets.

@himangSharatun
Created February 9, 2018 07:43
Show Gist options
  • Save himangSharatun/3db4de1139597ce14bfc019bc85f507a to your computer and use it in GitHub Desktop.
Save himangSharatun/3db4de1139597ce14bfc019bc85f507a to your computer and use it in GitHub Desktop.
# define baseline model
def baseline_model():
# create model
model = Sequential()
model.add(Dense(5000, input_shape=(len(bow[0]),), activation='relu'))
model.add(Dropout(0.2))
model.add(Dense(len(dummy_y[0]), activation='softmax'))
# Compile model
model.summary()
model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])
return model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment