Created
April 3, 2018 10:58
-
-
Save akimach/a6f8cbbbf66535f665d78fae11576509 to your computer and use it in GitHub Desktop.
This file contains 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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# ANN Visualizer \n", | |
"\n", | |
"https://github.com/Prodicode/ann-visualizer" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"Using TensorFlow backend.\n" | |
] | |
} | |
], | |
"source": [ | |
"from ann_visualizer.visualize import ann_viz\n", | |
"import keras\n", | |
"from keras.models import Sequential\n", | |
"from keras.layers import Dense" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"model = Sequential()\n", | |
"model.add(Dense(input_dim=2, units=1, activation='sigmoid'))\n", | |
"model.add(Dense(units=1, activation='sigmoid'))\n", | |
"ann_viz(model, title=\"Perceptron\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"model = Sequential()\n", | |
"model.add(Dense(input_dim=2, units=2, activation='sigmoid'))\n", | |
"model.add(Dense(input_dim=2, units=3, activation='sigmoid'))\n", | |
"model.add(Dense(units=2, activation='sigmoid'))\n", | |
"ann_viz(model, title=\"MLP\")" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! We have added support for Conv2D, MaxPooling2D, Flatten and Dropout layers!