layers with nodes
intro
We can use Mermaid, a simple Markdown-like script language for generating charts from text via JavaScript (Mallin, 2018), to draw layers with nodes, where the diagram element used is circle and the feature of subgraph. But this would not be the main purpose of Mermaid, but we can use for it.
model
- From right to left it is a
2 <-- 3 <-- 4 <-- 3
architecture.- Note: Usual notation is from left to right as
3-4-3-2
.
- Note: Usual notation is from left to right as
mermaid
notes
- Input, two hidden, and output layers, each is put in
subgraph
-end
block. - Nodes are named without name of layers containing them for simplicity.
- Weights
w
,v
,u
maps nodes and indicated with their sub-index.- e.g.
G2 <-- w23 -- H3
, where this means better from right to left.
- e.g.
- CSS class is defined using
classDef
and later used usingclass
. - For link or line connecting elements it style is modified via
linkStyle
.
refs
- Wallin M (2018) “Generating documentation as code with mermaid and PlantUML”, Rule of Tech, url https://ruleoftech.com/2018/generating-documentation-as-code-with-mermaid-and-plantuml .