1from keras.models import Sequential
2from keras.layers import Dense, Activation
3
4model = Sequential([
5 Dense(32, input_shape=(784,)),
6 Activation('relu'),
7 Dense(10),
8 Activation('softmax'),
9])
1model = keras.Sequential(
2 [
3 layers.Dense(2, activation="relu"),
4 layers.Dense(3, activation="relu"),
5 layers.Dense(4),
6 ]
7)
8