Skip to content

Instantly share code, notes, and snippets.

@merishnaSuwal
Created November 9, 2020 03:44
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save merishnaSuwal/993401c6d1a65a26aa778401ddc02ac8 to your computer and use it in GitHub Desktop.
# 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 = model.fit(X_train, 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