Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by deehouie on Thursday February 21, 2019 @01:18PM
(#19219119)
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.
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by rflrob on Thursday February 21, 2019 @02:11PM
(#19219672)
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.
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by pure-awesome on Thursday February 21, 2019 @09:49AM
(#19217192)
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.
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by yata01 on Thursday February 21, 2019 @04:21PM
(#19220674)
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.
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by ironfootnz on Thursday February 21, 2019 @06:27PM
(#19221640)
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.
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by Jtsummers on Thursday February 21, 2019 @10:31AM
(#19217494)
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.
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by mruts on Thursday February 21, 2019 @09:17AM
(#19216986)
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.
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by taeric on Thursday February 21, 2019 @11:40AM
(#19218057)
A problem with trying to replace TeX is that the only real problem with it is aesthetic of implementation language. And its main strength is its stability.
Note, it is not that it renders documents well. While, I do appreciate that fact, the real strength is I am not constantly having to play gardener with all of the documents I've written. Any bitrot in my document will come from facts in it, not because this year's version decided that promises were better than callbacks. Or that "box-sizing: border-box" is the more natural way to do things. (Or yet another brand new construct to lay things out.)
I think a lot of this stability can be traced directly to Knuth. He has a discipline that is basically unmatched.
And it isn't like he hasn't had some misgivings about choices he has made. However, his main choice that he is willing to stick with is stability. And that is huge for long term use.
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by xvilka on Thursday February 21, 2019 @10:10AM
(#19217333)
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.
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by jimhefferon on Thursday February 21, 2019 @12:22PM
(#19218506)
There are recent alternatives that seem pretty ambitious (I'll just mention https://www.tug.org/TUGboat/tb38-1/tb118cozens.pdf as a proof of existence). That I can see, though, any system capable enough to do as much is just as complex. Would be interested in being proved wrong, though.
As other people have mentioned, the LuaTeX folks have got a real good thing going. It is climbing the adoption curve but it makes reasonable some things that in the past have not really been reasonable to program (at least for me).
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by SiempreViernes on Thursday February 21, 2019 @09:27AM
(#19217057)
Sure, just port the entire tex package ecosystem first would you? Tex isn't cumbersome enough to give up for anything less than feature parity with those.
Re:PlotNeuralNet: Latex Code for Drawing Neural Networks
by mruts on Thursday February 21, 2019 @09:43AM
(#19217152)
That's clearly a major impediment. But we've overcome network effects many times in the past: MySpace, the JVM, x86_64, etc etc. It's just that no one really cares, and there's probably no money to be made in the process. Using LaTeX is never more than a slight to moderate inconvenience, but it's still unpleasant.
To add emphasis, anyone who ever used latex knows that it is a pain at the ass.
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...
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.
Otherwise, these graphics are wonderful to look at.
Are there good alternatives?
From what I know tikz, PowerPoint (or Keynote), or Inkscape are popular options. But they require manual work.
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.
Note, it is not that it renders documents well. While, I do appreciate that fact, the real strength is I am not constantly having to play gardener with all of the documents I've written. Any bitrot in my document will come from facts in it, not because this year's version decided that promises were better than callbacks. Or that "box-sizing: border-box" is the more natural way to do things. (Or yet another brand new construct to lay things out.)
I think a lot of this stability can be traced directly to Knuth. He has a discipline that is basically unmatched.
And it isn't like he hasn't had some misgivings about choices he has made. However, his main choice that he is willing to stick with is stability. And that is huge for long term use.
[1] https://github.com/latex3/latex3
[2] https://www.latex-project.org/help/documentation/ltx3info.pd...
[3] http://www.luatex.org/
As other people have mentioned, the LuaTeX folks have got a real good thing going. It is climbing the adoption curve but it makes reasonable some things that in the past have not really been reasonable to program (at least for me).