Created
April 9, 2017 21:57
-
-
Save jbn/934dc768b0b11c732e7c5a17ab26bed7 to your computer and use it in GitHub Desktop.
Example for `imate` in Slack Channel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from IPython.display import SVG | |
from keras.utils.vis_utils import model_to_dot | |
from keras.models import Sequential | |
from keras.layers import Dense, Activation | |
model = Sequential([ | |
Dense(32, input_shape=(784,)), | |
Activation('relu'), | |
Dense(10), | |
Activation('softmax'), | |
]) | |
with open("my_graph.svg", "wb") as fp: | |
fp.write(model_to_dot(model).create_svg()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment