Skip to content

Instantly share code, notes, and snippets.

@sdcubber
Last active September 15, 2018 09:05
Show Gist options
  • Select an option

  • Save sdcubber/07aa4896ea5838138d1a55e82a3ef72c to your computer and use it in GitHub Desktop.

Select an option

Save sdcubber/07aa4896ea5838138d1a55e82a3ef72c to your computer and use it in GitHub Desktop.
from keras import models
from keras import layers
network = models.Sequential()
network.add(layers.Dense(512, activation='relu', input_shape=(28 * 28, )))
network.add(layers.Dense(256, activation='relu'))
network.add(...)
network.add(layers.Dense(10, activation='softmax'))
network.compile(optimizer='sgd', loss='categorical_crossentropy', metrics=['accuracy'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment