Last active
January 23, 2020 20:26
-
-
Save kmcelwee/8077dd9bbd792161977be9c796421fe5 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
HOURS_AHEAD = 24 | |
s = all_X.shape[1] | |
model = tf.keras.Sequential() | |
model.add(layers.Dense(s, activation=tf.nn.relu, input_shape=(HOURS_AHEAD, all_X.shape[1]))) | |
model.add(layers.Dense(s, activation=tf.nn.relu)) | |
model.add(layers.Dense(s, activation=tf.nn.relu)) | |
model.add(layers.Dense(s, activation=tf.nn.relu)) | |
model.add(layers.Dense(s, activation=tf.nn.relu)) | |
model.add(layers.Flatten()) | |
model.add(layers.Dense(all_X.shape[1]*HOURS_AHEAD//2, activation=tf.nn.relu)) | |
model.add(layers.Dense(HOURS_AHEAD)) | |
nadam = tf.keras.optimizers.Nadam(learning_rate=0.002, beta_1=0.9, beta_2=0.999) | |
model.compile(optimizer=nadam, loss='mape') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment