Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Oct 28, 2021
Embed
What would you like to do?
from keras.models import Sequential
from keras.layers import Dense, Activation
model = Sequential()
model.add(Dense(64, input_dim=2))
model.add(Activation("relu"))
model.add(Dense(32))
model.add(Activation("relu"))
model.add(Dense(16))
model.add(Activation("relu"))
model.add(Dense(2))
model.add(Activation("softmax"))
model.compile(optimizer="adam", loss="categorical_crossentropy", metrics=["accuracy"])
model.summary()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment