
PlotNeuralNet: Latex Code for Drawing Neural Networks - EvgeniyZh
https://github.com/HarisIqbal88/PlotNeuralNet
======
deehouie
This is fantastic. One the most difficult tasks writing a deep learning paper
is actually drawing the complex architecture of multilayer nets. I would
consider this a major contribution to field !

To add emphasis, anyone who ever used latex knows that it is a pain at the
ass.

------
rflrob
I wonder if tikz/LaTeX is the best output format for this. When I'm making
figures it has been fastest for me to have code that generates 90% the right
thing, then tweak as necessary in Illustrator/Inkscape to get different parts
to line up, combine subfigures, etc.

If I did anything with neural nets, I might take the time to bolt on an option
for output to SVG. EPS or some other vector format would be great as well, but
I am not that much of a wizard.

For more discussion on reproducibility and hardcoding figures, see for
example: [http://rajlaboratory.blogspot.com/2016/02/from-
reproducibili...](http://rajlaboratory.blogspot.com/2016/02/from-
reproducibility-to-over.html)

------
SiempreViernes
This is more of a python generator for latex code that illustrates a neural
network, not an package for drawing NN's with latex.

~~~
pure-awesome
Yes, I was slightly disappointed to discover this fact.

From the title, I thought it would be something I'd be able to run semi-
automatically on a neural net (presumably defined in a standard / widely-used
format like a Tensorflow net) and have it spit out a nice diagram.

Don't get me wrong, this still seems super-useful. It's just not what I
expected.

------
yata01
It would be really awesome if someone could package this into a Latex package.
Then you could directly define your neural net inside of Latex instead of
having to generate the Tex from python.

Otherwise, these graphics are wonderful to look at.

------
ironfootnz
WOW! That's the kind of tool I needed. Working on simple NN now and then is
hard to show to decision makers what processes were applied. Having a visual
latex like that, makes life easier.

------
zapnuk
I think this looks very good. More examples (with the generating python code)
would be nice.

Are there good alternatives?

From what I know tikz, PowerPoint (or Keynote), or Inkscape are popular
options. But they require manual work.

~~~
Jtsummers
Under the hood this is generating tikz. I imagine with more TeX/LaTeX skills
than I have, someone could embed much of this directly within LaTeX to hide
tikz manual (and tedious) work.

------
LeanderK
I was JUST searching for something like this! This is great!

------
mruts
It's nice that they have a python interface. I know everyone has a fetish for
TeX/LaTeX, but isn't it time for something better? Don't get me wrong, TeX has
probably the best document rendering of anything I've ever come across, but
the language itself is quite terrible. I get the impression that no one even
knows how to use it anymore, and everyone is just copying and pasting code
handed down from generations of professors and students.

I understand the limitations and design decisions made at the time, but I
think it's time for something new. Maybe just using TeX as a backend language
would be acceptable, though I think it would just be preferable to start anew.
I know there's Scribble but I don't think it handles equations.

~~~
xvilka
LaTeX3[1][2] improves matters and LuaTeX[3] is getting more traction, so more
and more parts get written in Lua and more stuff gets deprecated. What I don't
really get why LuaTeX project is not very open and their source repository is
not anonymously accessible. Would be so much better if they migrate ot GitHub
or GitLab.

[1] [https://github.com/latex3/latex3](https://github.com/latex3/latex3)

[2] [https://www.latex-
project.org/help/documentation/ltx3info.pd...](https://www.latex-
project.org/help/documentation/ltx3info.pdf)

[3] [http://www.luatex.org/](http://www.luatex.org/)

~~~
svat
BTW the LuaTeX source isn't really hidden; there's an unofficial GitHub mirror
at [https://github.com/TeX-Live/luatex](https://github.com/TeX-Live/luatex)
(or look at [https://github.com/TeX-Live/texlive-
source/tree/trunk/texk/w...](https://github.com/TeX-Live/texlive-
source/tree/trunk/texk/web2c/luatexdir) specifically) and for their official
SVN repository at [https://serveur-
svn.lri.fr/svn/modhel/luatex](https://serveur-svn.lri.fr/svn/modhel/luatex)
the username/password (anonsvn/anonsvn) are listed in a few places (e.g. here:
[http://www.luatex.org/development.html](http://www.luatex.org/development.html)
and in their mailing list announcements).

