Created
November 9, 2020 03:44
-
-
Save merishnaSuwal/993401c6d1a65a26aa778401ddc02ac8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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