Nothing
test_that("nndiagram_oversize works", {
expect_equal(nndiagram_oversize(input=3,hidden = c(6,6),size.cutoff = 5), c( "% To make the code work in any 'LaTeX' editor, users need to install and import two 'TeX' packages in the setting, including 'TikZ'. ",
"% Users are recommended to try the output 'LaTeX' code in Overleaf. ",
" ",
"\\usepackage{tikz} ",
"\\def\\layersep{2.5cm} ",
"\\newcommand*\\circled[1]{\\tikz[baseline=(char.base)]{ ",
" \\node[shape=rectangle,inner sep=3pt, draw=black!100, fill= black!25] (char) {#1};}} ",
" ",
"\\begin{figure}[!ht] ",
"\\centering ",
"\\begin{tikzpicture}[shorten >=1pt,draw=black!100, node distance=\\layersep, scale=1] ",
" \\tikzstyle{every pin edge}=[<-,shorten <=1pt]; ",
" \\tikzstyle{neuron}=[circle, draw=black!100, minimum size=17pt,inner sep=0pt]; ",
" \\tikzstyle{invisible neuron}=[draw=none, scale=2]; ",
" \\tikzstyle{input neuron}=[neuron]; ",
" \\tikzstyle{output neuron}=[neuron]; ",
" \\tikzstyle{hidden neuron}=[neuron]; ",
" \\tikzstyle{annot} = [text width=4em, text centered, text=black!100] ",
" ",
" % drawing neurons ",
" \\foreach \\name / \\y in {1,...,3} ",
" \\node [input neuron, pin=left:\\textcolor{black!100}{Input \\y}] (I-\\name) at (0,-1-\\y) {};",
" \\node[hidden neuron,yshift=0cm] (H-1) at (1* \\layersep, -1 cm) {}; ",
" \\node[invisible neuron,yshift=0cm] (H-2) at (1* \\layersep, -2 cm) {}; ",
" \\node[hidden neuron,yshift=0cm] (H-3) at (1* \\layersep, -3 cm) {}; ",
" \\node[invisible neuron,yshift=0cm] (H-4) at (1* \\layersep, -4 cm) {}; ",
" \\node[hidden neuron,yshift=0cm] (H-5) at (1* \\layersep, -5 cm) {};",
" \\node[hidden neuron,yshift=0cm] (H-6) at (2* \\layersep, -1 cm) {}; ",
" \\node[invisible neuron,yshift=0cm] (H-7) at (2* \\layersep, -2 cm) {}; ",
" \\node[hidden neuron,yshift=0cm] (H-8) at (2* \\layersep, -3 cm) {}; ",
" \\node[invisible neuron,yshift=0cm] (H-9) at (2* \\layersep, -4 cm) {}; ",
" \\node[hidden neuron,yshift=0cm] (H-10) at (2* \\layersep, -5 cm) {};",
" \\node[output neuron,pin={[pin edge={->}]right:\\textcolor{black!100}{Output}}, right of=H-8, yshift=0cm] (O) {}; ",
" \\draw[line width=3pt, loosely dotted, dash pattern=on 0.1pt off 10pt, line cap=round] ([yshift=1ex]H-2.north) -- ([yshift=-1ex]H-2.south); ",
" \\draw[line width=3pt, loosely dotted, dash pattern=on 0.1pt off 10pt, line cap=round] ([yshift=1ex]H-4.north) -- ([yshift=-1ex]H-4.south); ",
" \\draw[line width=3pt, loosely dotted, dash pattern=on 0.1pt off 10pt, line cap=round] ([yshift=1ex]H-7.north) -- ([yshift=-1ex]H-7.south); ",
" \\draw[line width=3pt, loosely dotted, dash pattern=on 0.1pt off 10pt, line cap=round] ([yshift=1ex]H-9.north) -- ([yshift=-1ex]H-9.south); ",
"",
" % drawing arrows ",
" \\foreach \\source in {1,...,3} ",
" \\foreach \\dest in {1,3,5} ",
" \\path [->] (I-\\source) edge (H-\\dest);",
" \\foreach \\source in {1,3,5} ",
" \\foreach \\dest in {6,8,10} ",
" \\path [->] (H-\\source) edge (H-\\dest);",
" \\foreach \\source in {6,8,10} ",
" \\path [->] (H-\\source) edge (O); ",
" ",
" % annotations ",
" \\node[annot,above of=I-1, node distance=3cm] {Input layer}; ",
" \\node[annot,above of=I-1, node distance=2cm] {$\\circled{3}$}; ",
" \\node[annot,above of=H-1, node distance=2cm] (hl1) {Hidden layer 1}; ",
" \\node[annot,above of=H-1, node distance=1cm] (hl1) {$\\circled{6}$}; ",
" \\node[annot,above of=H-6, node distance=2cm] (hl2) {Hidden layer 2}; ",
" \\node[annot,above of=H-6, node distance=1cm] (hl2) {$\\circled{6}$}; ",
" \\node[annot,above of =O, node distance=4cm] {Output layer}; ",
" \\node[annot,above of =O, node distance=3cm] {$\\circled{1}$}; ",
"",
"\\end{tikzpicture} ",
"\\caption{} ",
"\\label{} ",
"\\end{figure} " ))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.