Harnessing the Full Power of Modern Neural Nets: Tools and Resources from a Beginners Perspective
I recently graduated from Flatiron’s data science Bootcamp. After graduation, I certainly did not know everything, but I felt like I had a pretty good grasp on a general process and workflow. Then I started reading about neural nets extensively and saw that they were quickly becoming the answer to a lot of machine learning problems. One creative example was using time series data; a modern neural network can be fed images of graphs and predict trends from visual analysis. Neural networks are incredibly flexible and you are only limited by your creativity in how you utilize them.
That being said, there are some hurdles to overcome. Today I will talk a little bit about how to set up an environment for up-to-date neural nets. Disclaimer: I am very new at this, that could either be a benefit since I know what problems you are about to have or a massive curse if I lead you astray. I will try to keep this blog updated in the future and edit anything that I find a better way of doing.
If you are reading a machine learning blog you probably have a general idea that a GPU is an expensive graphics card that gamers use and you probably heard about it for data science in some capacity. Let's go a little deeper into why they are necessary: Basically, a GPU can do a large number of small operations more slowly while a CPU can do one thing very quickly. Neural nets rely on very simple math, mainly just addition and multiplication, but they need to do these operations many times, especially as they grow more complex. I like this blog's comparison between a Ferrari and a freight truck. You might be able to drive across the country twice as fast in a Ferrari but you can bring a lot more stuff with you with a freight truck.
Do I have to buy one?
Definitely not, in fact, the resources I have seen generally recommend against it. They are expensive and time-consuming to configure. Learning the ins and outs of neural nets is hard enough, adding complicated hardware into the mix may be frustrating and lead to roadblocks you may not otherwise face. That being said if hardware is your thing, then by all means go for it.
Google collab functions a lot like jupyter notebooks and lets you use a GPU for free. They are some differences, some downsides, and a learning curve which I will try my best to go into here. It runs .ipynb files on your browser just like a jupyter notebook. There is also expanded integration with HTML and images, so if you have some web development skills you can jazz up your notebooks even more. A great feature on chrome is that on GitHub you can open any notebook right in your browser and run all the code without downloading anything. In some ways, this could even lead to some bad habits on git since you can also push changes to your repositories right on your browser just by clicking file save within the Colab notebook.
On the other hand, I could see this becoming more of a standard workflow in the industry since it’s about as easy as using a google doc, but I’m not super versed in all the drawbacks and advantages to a more traditional data science workflow. And knowing all about Github is important for when you come across some inevitable problems the day before your project is due.
One of the first things that can be kind of alarming is that Colab does not save any of your work automatically. You have to either push the changes to GitHub or use google drive. Either one draws you ever deeper into google’s clutches since they will have access to all your data on your drive or keep track of all the pushes to your GitHub. This is something I like to talk about but then I get distracted by free GPU access and the ease of use of google collab. It’s kind of feels like the old quote about giving the roman people bread and circuses, as a distracted citizenry makes it easier to repeatedly fire your data ethics team without anyone noticing.
This blog is amazing for troubleshooting, especially if you want to integrate collab in the same workflow you use now. I could copy and paste all the code here but the blog explains the hows and why better than I can.
It’s my understanding, from a couple of different sources, including talking with some industry professionals. that Tensor flow is all but gone from academic usage and that industry will soon die down as well. I never honestly learned much Keras or tensor flow but so far PyTorch has been incredibly easy to learn and can be configured about as much or as little as you want it to be. Fastai makes training a neural net about as easy as logging on to a website. This site has a free course with jupyter textbooks and extensive video lectures all about using neural nets that’s good for just about any ability level. If you meet an aspiring data scientist, I would send them here: it's up to date, free, and written to be incredibly accessible.
Neural nets are becoming an ever-larger part of machine learning. You need GPU access to fully take advantage of their capabilities. Google collab is incredibly easy to use, but it’s made by Google and comes with all the ethical concerns you might have with further integrating your life under their ever-expanding sphere of influence. Pytorch is the future, for at least 2 or 3 years when it gets replaced, and has a variety of wrappers like fastai that make it good for any ability level.