Skip to main content

graphics - Neural network illustrations


(Since this post was met with a certain reluctance to be given answers, a version of it is also posted in Community.)


Please share neural networks diagrams you have made in Mathematica / WL. Here is an example:


ClearAll[a];
ns = {3, 4, 6, 4, 1};

nodes = MapIndexed[Function[{n, i}, Prepend[#, i[[1]]] & /@ Array[a, {n}]], ns];
edges = Map[Outer[Rule, #[[1]], #[[2]]] &, Partition[nodes, 2, 1]];
colors = Map[# -> ColorData[11, "ColorList"][[#[[1]]]] &, Flatten[nodes]];
Graph[Flatten[edges], VertexSize -> 0.3, VertexStyle -> colors]

enter image description here


But, here are some more examples.


Update


Addressing the concerns in the comments... The question is intentionally given with a short explanation and a link to examples. I wanted to gather some pictures of neural networks made with Mathematica for a few presentations about deep learning (with Mathematica.) I was somewhat surprised that such images were not easy to find.


What I am interested are images like these:



enter image description here


enter image description here


enter image description here




Comments