Over the weekend I was struck with the realization that I don't know _how to use neural networks in practice, damn it. _Even though a few months ago I realized what neural networks are, even though I've tried implementing them, even though I've used them in a class setting ...
How the hell do you use these things in real life!?
Implement from scratch? ... no that can't be it.
Find a library, write some code, run some tests, fiddle with features, run a test, fiddle with features, realize everything is slow, decide to use more layers, fiddle with features, play around with activation functions, run a test, fiddle with features, rewrite the code because it's a mess, fiddle with features, run a test, run the network, run more tests and so on and on ad nauseum.
That can't be it either ...
Looking far and wide for a good library to use I stumbled upon FANN - Fast Artificial Neural Networks.
Fast Artificial Neural Network Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks. Cross-platform execution in both fixed and floating point are supported. It includes a framework for easy handling of training data sets. It is easy to use, versatile, well documented, and fast. Bindings to more than 15 programming languages are available. An easy to read introduction article and a reference manual accompanies the library with examples and recommendations on how to use the library. Several graphical user interfaces are also available for the library.
Not only has someone gone to the trouble of implementing everything and making sure it works - nothing sucks more than figuring out whether you're using your learning software wrong or it's just buggy - they even gave it all the fiddly features I need!
It gets better! There's a slew of graphical interfaces -> You get to play with the fiddly bits without even knowing what you're doing! Yes!
Put the data in the fann format, load it up, and away you go. Playing around until you figure out what you're looking for, then you can just implement the same thing with the FANN binding of your choice.
FANN really saved my skin last night. At least the GUI did. I still haven't solved my problem - trying to predict how many people will read a whole post - but it took me literally a couple of minutes to realize that the same network can't be used to predict two outputs since it won't even converge.
That's something very specific to the problem.
I also realized the networks were overfitting my data, then performing poorly on the test.
Another specific thing.
It is because of this incredibly problem-specific nature of most work involving neural networks that having tools like these is really important. Who wants to fiddle around with implementing all this stuff by hand for several hours before even running the first tests?
I probably ran twenty or thirty different configurations in the space of three hours last night. Could I have done that without a simple tool? Probably not - wouldn't even have the first configuration implemented by now.
Now if only the GUI tool calculated precision and recall instead of mean standard error ...
- I think I finally understand what a neural network is (swizec.com)
- I suck at implementing neural networks in octave (swizec.com)
- Characteristics of Machine Learning Model (horicky.blogspot.com)
- Neural network: should the algorithm be rewritten for every case? (stackoverflow.com)
- Is it possible for Encog or Neuroph to run on Android? (stackoverflow.com)
- Sabbatical week day 3: Raining datatypes (swizec.com)
- C++ machine learning framework (stackoverflow.com)
I write articles with real insight into the career and skills of a modern software engineer. "Raw and honest from the heart!" as one reader described them. Fueled by lessons learned over 20 years of building production code for side-projects, small businesses, and hyper growth startups. Both successful and not.
Subscribe below 👇
Join Swizec's Newsletter and get insightful emails 💌 on mindsets, tactics, and technical skills for your career. Real lessons from building production software. No bullshit.
"Man, love your simple writing! Yours is the only newsletter I open and only blog that I give a fuck to read & scroll till the end. And wow always take away lessons with me. Inspiring! And very relatable. 👌"
Have a burning question that you think I can answer? Hit me up on twitter and I'll do my best.
Who am I and who do I help? I'm Swizec Teller and I turn coders into engineers with "Raw and honest from the heart!" writing. No bullshit. Real insights into the career and skills of a modern software engineer.
Want to become a true senior engineer? Take ownership, have autonomy, and be a force multiplier on your team. The Senior Engineer Mindset ebook can help 👉 swizec.com/senior-mindset. These are the shifts in mindset that unlocked my career.
Curious about Serverless and the modern backend? Check out Serverless Handbook, for frontend engineers 👉 ServerlessHandbook.dev
Want to Stop copy pasting D3 examples and create data visualizations of your own? Learn how to build scalable dataviz React components your whole team can understand with React for Data Visualization
Did someone amazing share this letter with you? Wonderful! You can sign up for my weekly letters for software engineers on their path to greatness, here: swizec.com/blog
By the way, just in case no one has told you it yet today: I love and appreciate you for who you are ❤️