Skip to content

Instantly share code, notes, and snippets.

@riceissa
Created March 24, 2018 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riceissa/95e6171f4bae5ceca034c3cbb9a86508 to your computer and use it in GitHub Desktop.
Save riceissa/95e6171f4bae5ceca034c3cbb9a86508 to your computer and use it in GitHub Desktop.
# License: CC0 https://creativecommons.org/publicdomain/zero/1.0/
# Output produced using `dot -Tpng -O simple_network.gv`
digraph G {
rankdir=LR
splines=line
subgraph cluster_0 {
color=white;
node [style=solid, color=blue4, shape=circle];
a11 [label=<a<sup>1</sup><sub>1</sub>>];
a12 [label=<a<sup>1</sup><sub>2</sub>>];
label = "Layer 1 (input layer)";
}
subgraph cluster_1 {
color=white;
node [style=solid, color=red4, shape=circle];
a21 [label=<a<sup>2</sup><sub>1</sub>>];
a22 [label=<a<sup>2</sup><sub>2</sub>>];
a23 [label=<a<sup>2</sup><sub>3</sub>>];
label = "Layer 2 (hidden layer)";
}
subgraph cluster_2 {
color=white;
node [style=solid, color=green4, shape=circle];
a31 [label=<a<sup>3</sup><sub>1</sub>>];
a32 [label=<a<sup>3</sup><sub>2</sub>>];
label = "Layer 3 (output layer)";
}
a11 -> a21 [label=<w<sup>2</sup><sub>1←1</sub>>];
a11 -> a22;
a11 -> a23;
a12 -> a21;
a12 -> a22;
a12 -> a23 [label=<w<sup>2</sup><sub>3←2</sub>>];
a21 -> a31 [label=<w<sup>3</sup><sub>1←1</sub>>];
a21 -> a32;
a22 -> a31;
a22 -> a32;
a23 -> a31;
a23 -> a32 [label=<w<sup>3</sup><sub>2←3</sub>>];
}
@riceissa
Copy link
Author

simple_network gv

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