neural icon indicating copy to clipboard operation
neural copied to clipboard

parameter matrix between layers

Open forrestbao opened this issue 3 years ago • 2 comments

Hi, how to add a parameter matrix between layers, like the \Theta in Fig. 28 of neural-netowrks-ebook.pdf?

forrestbao avatar Oct 22 '20 20:10 forrestbao

Use title in \linklayers. As the example blow:

\begin{neuralnetwork}[height=5]
	\newcommand{\nodetextclear}[2]{}
	\setdefaultnodetext{\nodetextclear}
	\inputlayer[count=4, bias=false, title=Input]
	\hiddenlayer[count=5, bias=false, title=Hidden, exclude={3,4}]
	\linklayers[title={$w_{ij}$},not to={3,4}]
	\outputlayer[count=3, title=Output]
	\linklayers[title={$w_{jk}$},not from={3,4}]
	\link[style={-, line width=2mm,line cap=round, dash pattern=on 0pt off 6mm, shorten <= 6mm, shorten >= 4mm}, from layer=1, from node=2, to layer=1, to node=5]
\end{neuralnetwork}

igormorgado avatar May 14 '21 05:05 igormorgado

How do you make these examples work @igormorgado? I cannot run them whenever I have exclude, not to, or not from in my code.

It tells me:

Undefined control sequence.
\pgffor@body ->\if \nn@excluded \nn@lastnode 
                                             \global \def \nn@dontdraw {1} \...
l.30 \end{neuralnetwork}

singularitti avatar Apr 18 '23 05:04 singularitti