Created
August 24, 2020 05:22
-
-
Save saimadhu-polamuri/d709741375eba20f7b54ddd4e9143fea 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
## Model with Dropout | |
from tensorflow.keras.layers import Dropout | |
model = Sequential() | |
model.add(Dense(500, input_dim=2, activation='relu')) | |
model.add(Dropout(0.5)) | |
model.add(Dense(128, activation='relu')) | |
model.add(Dropout(0.25)) | |
model.add(Dense(1, activation='sigmoid')) | |
model.compile(loss='binary_crossentropy', | |
optimizer='adam', | |
metrics=['accuracy']) | |
history = model.fit(x_train, y_train, | |
validation_data=(x_test, y_test), | |
epochs=500, verbose=0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment