Skip to content

Instantly share code, notes, and snippets.

@hsiaoer
Created April 10, 2018 15:31
Show Gist options
  • Save hsiaoer/56b989cf78060e93dbdef1de1efb5ef4 to your computer and use it in GitHub Desktop.
Save hsiaoer/56b989cf78060e93dbdef1de1efb5ef4 to your computer and use it in GitHub Desktop.
mwitiderrick-intro-make-classifier
def make_classifier():
classifier = Sequential()
classiifier.add(Dense(3, kernel_initializer = ‘uniform’, activation = ‘relu’, input_dim=5))
classiifier.add(Dense(3, kernel_initializer = ‘uniform’, activation = ‘relu’))
classifier.add(Dense(1, kernel_initializer = ‘uniform’, activation = ‘sigmoid’))
classifier.compile(optimizer= ‘adam’,loss = ‘binary_crossentropy’,metrics = [‘accuracy’])
return classifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment