Skip to content

Instantly share code, notes, and snippets.

@jeetaf
Created June 28, 2021 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeetaf/05f300503decd5a87067484fc5fec099 to your computer and use it in GitHub Desktop.
Save jeetaf/05f300503decd5a87067484fc5fec099 to your computer and use it in GitHub Desktop.
def build_model():
model = keras.Sequential([
layers.Dense(64, activation=tf.nn.relu, input_shape=[len(train_dataset.keys())]),
layers.Dense(64, activation=tf.nn.relu),
layers.Dense(1)
])
optimizer = tf.keras.optimizers.RMSprop(0.001)
model.compile(loss='mean_squared_error',
optimizer=optimizer,
metrics=['mean_absolute_error', 'mean_squared_error'])
return model
model = build_model()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment