Skip to content

Instantly share code, notes, and snippets.

@akimach
Created April 3, 2018 10:58
Show Gist options
  • Save akimach/a6f8cbbbf66535f665d78fae11576509 to your computer and use it in GitHub Desktop.
Save akimach/a6f8cbbbf66535f665d78fae11576509 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"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
}
@RedaOps
Copy link

RedaOps commented Apr 5, 2018

Hi! We have added support for Conv2D, MaxPooling2D, Flatten and Dropout layers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment