summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/neuralnetwork/examples
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /graphics/pgf/contrib/neuralnetwork/examples
Initial commit
Diffstat (limited to 'graphics/pgf/contrib/neuralnetwork/examples')
-rw-r--r--graphics/pgf/contrib/neuralnetwork/examples/neural-networks-ebook.pdfbin0 -> 594709 bytes
-rw-r--r--graphics/pgf/contrib/neuralnetwork/examples/neuralnetwork.pdfbin0 -> 30526 bytes
-rw-r--r--graphics/pgf/contrib/neuralnetwork/examples/neuralnetwork.tex14
-rw-r--r--graphics/pgf/contrib/neuralnetwork/examples/xor.pdfbin0 -> 25058 bytes
-rw-r--r--graphics/pgf/contrib/neuralnetwork/examples/xor.tex36
5 files changed, 50 insertions, 0 deletions
diff --git a/graphics/pgf/contrib/neuralnetwork/examples/neural-networks-ebook.pdf b/graphics/pgf/contrib/neuralnetwork/examples/neural-networks-ebook.pdf
new file mode 100644
index 0000000000..fc49fb4130
--- /dev/null
+++ b/graphics/pgf/contrib/neuralnetwork/examples/neural-networks-ebook.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/neuralnetwork/examples/neuralnetwork.pdf b/graphics/pgf/contrib/neuralnetwork/examples/neuralnetwork.pdf
new file mode 100644
index 0000000000..dc047783c5
--- /dev/null
+++ b/graphics/pgf/contrib/neuralnetwork/examples/neuralnetwork.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/neuralnetwork/examples/neuralnetwork.tex b/graphics/pgf/contrib/neuralnetwork/examples/neuralnetwork.tex
new file mode 100644
index 0000000000..7112ef0810
--- /dev/null
+++ b/graphics/pgf/contrib/neuralnetwork/examples/neuralnetwork.tex
@@ -0,0 +1,14 @@
+\documentclass{standalone}
+
+\usepackage{neuralnetwork}
+
+\begin{document}
+ \begin{neuralnetwork}[height=4]
+ \newcommand{\nodetextclear}[2]{}
+ \newcommand{\nodetextx}[2]{$x_#2$}
+ \newcommand{\nodetexty}[2]{$y_#2$}
+ \inputlayer[count=4, bias=false, title=Input\\layer, text=\nodetextx]
+ \hiddenlayer[count=5, bias=false, title=Hidden\\layer, text=\nodetextclear] \linklayers
+ \outputlayer[count=3, title=Output\\layer, text=\nodetexty] \linklayers
+ \end{neuralnetwork}
+\end{document}
diff --git a/graphics/pgf/contrib/neuralnetwork/examples/xor.pdf b/graphics/pgf/contrib/neuralnetwork/examples/xor.pdf
new file mode 100644
index 0000000000..62c3d9be56
--- /dev/null
+++ b/graphics/pgf/contrib/neuralnetwork/examples/xor.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/neuralnetwork/examples/xor.tex b/graphics/pgf/contrib/neuralnetwork/examples/xor.tex
new file mode 100644
index 0000000000..30bfecc7a7
--- /dev/null
+++ b/graphics/pgf/contrib/neuralnetwork/examples/xor.tex
@@ -0,0 +1,36 @@
+\documentclass{standalone}
+
+\usepackage{neuralnetwork}
+
+\begin{document}
+ \begin{neuralnetwork}[height=2.5, layertitleheight=0, nodespacing=2.8cm, layerspacing=1.7cm]
+ \newcommand{\nodetextclear}[2]{}
+ \newcommand{\nodetextxnb}[2]{\ifnum0=#2 \else $x_#2$ \fi}
+ \newcommand{\logiclabel}[1]{\,{$\scriptstyle#1$}\,}
+ \newcommand{\nodetextY}[2]{$y$}
+ \newcommand{\linklabelsU}[4]{\logiclabel{+1}}
+ \newcommand{\linklabelsA}[4]{\ifnum0=#2 \logiclabel{+3} \else \logiclabel{-2} \fi}
+ \setdefaultnodetext{\nodetextclear}
+ % Input layer
+ \inputlayer[count=2, bias=false, text=\nodetextxnb]
+ % links to first hidden layer from input layer
+ \hiddenlayer[count=3, bias=false, exclude={1, 3}]
+ \link[from layer=0, to layer=1, from node=1, to node=2, label=\linklabelsA]
+ \link[from layer=0, to layer=1, from node=2, to node=2, label=\linklabelsA]
+ \hiddenlayer[count=2, bias=true, biaspos=center]
+ % links to second hidden layer from input and first hidden layer
+ \link[from layer=0, to layer=2, from node=1, to node=1, label=\linklabelsA]
+ \link[from layer=1, to layer=2, from node=2, to node=1, label=\linklabelsA]
+ \link[from layer=1, to layer=2, from node=2, to node=2, label=\linklabelsA]
+ \link[from layer=0, to layer=2, from node=2, to node=2, label=\linklabelsA]
+ \outputlayer[count=1, text=\nodetextY]
+ % links to output layer from second hidden layer
+ \link[from layer=2, to layer=3, from node=1, to node=1, label=\linklabelsA]
+ \link[from layer=2, to layer=3, from node=2, to node=1, label=\linklabelsA]
+ % links from bias node
+ \link[from layer=2, to layer=1, from node=0, to node=2, label=\linklabelsA]
+ \link[from layer=2, to layer=2, from node=0, to node=1, label=\linklabelsA]
+ \link[from layer=2, to layer=2, from node=0, to node=2, label=\linklabelsA]
+ \link[from layer=2, to layer=3, from node=0, to node=1, label=\linklabelsA]
+ \end{neuralnetwork}
+\end{document}