Created
May 3, 2020 03:39
-
-
Save Ruborcalor/626fe28243fd15ca1466e85d51300d04 to your computer and use it in GitHub Desktop.
Methylation: Neural Network Architecture
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
# Basic neural net with 4 dense layers | |
model = tf.keras.models.Sequential([ | |
tf.keras.layers.Dense(1024, activation='relu', input_shape=(25,)), | |
tf.keras.layers.Dropout(0.2), | |
tf.keras.layers.Dense(1024, activation='relu'), | |
tf.keras.layers.Dropout(0.2), | |
tf.keras.layers.Dense(1024, activation='relu'), | |
tf.keras.layers.Dropout(0.2), | |
tf.keras.layers.Dense(1) | |
]) | |
model.compile(loss= "mean_squared_error" , optimizer="adam", metrics=["mean_squared_error"]) | |
model.summary() | |
model.fit(train_processed_np, train_processed_ages, epochs=50, validation_data=(test_processed_np, test_processed_ages) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment