Skip to content

Latex package to create neural network figures with tikz

License

Notifications You must be signed in to change notification settings

xavigonzalvo/drawnn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drawnn

A sty Latex package to create neural network figures in Latex.

It requires tikz package to function.

Usage

It's really simple to draw neural networks:

\drawnn{<input dimension>}{<output dimension>}{<hidden layer dimensions>}{<options>}

For example, to create a neural network with 3 input nodes, 1 output and two hidden layers of 5 neurons, you can use:

\drawnn{3}{1}{5,5}{}
\drawnn{3}{1}{5,5}{center}
![neural network](example.jpg) ![neural network](example2.jpg)

Full latex example

It's really straightforward to use in a latex document. Just copy the sty file into the same folder where your tex file is and include the package nntikz.

\documentclass{article}
\usepackage{nntikz}
\title{Example}
\begin{document}
  \maketitle
  \begin{figure}
    \drawnn{2}{1}{3,3,4,2}{}
  \end{figure}
\end{document}

Options

There is only one option at the moment:

  • center: use to center all nodes with respect to vertical axis.

Example1 Example2

About

Latex package to create neural network figures with tikz

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages