Skip to content

Instantly share code, notes, and snippets.

@omchaithanyav
Last active July 7, 2021 15:12
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 omchaithanyav/5187ccd1a2ad246610e7255d8c2077fa to your computer and use it in GitHub Desktop.
Save omchaithanyav/5187ccd1a2ad246610e7255d8c2077fa to your computer and use it in GitHub Desktop.
model = tf.keras.models.Sequential([
tf.keras.layers.Dense(33, input_shape=(166,),
activation=tf.nn.tanh),
tf.keras.layers.Dense(1, activation=tf.nn.sigmoid)
])
# compile
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
history = model.fit(X_train, y_train, validation_data = (X_test, y_test), epochs = 15)
# Save the model
model.save("Simple ANN.h5")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment