Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Input
model = Sequential()
# Hidden layer
model.add(Dense(64, kernel_initializer='uniform', input_dim=24, activation='relu'))
# Output layer
model.add(Dense(1, kernel_initializer='uniform', activation='sigmoid'))
# Compiling the model with 'adam' optimizer and loss function as 'binary_crossentropy'
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
# Training the model
result =, y_train, epochs=100, validation_split=0.2, batch_size=40, verbose=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment