Last active
September 30, 2021 21:45
-
-
Save shayaf84/15127c8ff428533ae58efd0bc6fdcc18 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
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.layers import add, Dense, Dropout | |
from tensorflow.keras.optimizers import Adam | |
model = Sequential() | |
model.add(Dense(64,input_dim=29,activation='relu')) | |
model.add(Dense(32, activation = 'relu')) | |
model.add(Dropout(0.5)) | |
model.add(Dense(16,activation = 'relu')) | |
model.add(Dropout(0.15)) | |
model.add(Dense(1, activation = 'sigmoid')) | |
opt = Adam(learning_rate=1e-4, decay=1e-6) | |
model.compile(loss="binary_crossentropy",optimizer=opt,metrics=['Precision','Recall']) | |
model.fit(X_train, y_train, epochs = 5,\ | |
validation_data = (X_test, y_test)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment