Getting started with Fastai: A no-code overview
Recently I started the Fast.ai course Practical Deep Learning For Coders. Now this isn’t my first time around but I feel less intimidated this time. I watched all the video lessons for the 2020 version of the course, gaining some high level knowledge. I bought the book as well, which is mentioned on the course site lined above. I was excited about what is possible in deep learning yet equally intimidated by the sheer scope of the field.
To this day I am a believer in impostor syndrome; that is, I am living it on daily basis. Though I feel like I don’t know anything I am making tremendous progress in areas directly and indirectly related to deep learning.
For the 2020 course I found it hard to go beyond just running the provided notebooks. The barrier for me - and I’d wager for many others - is getting overwhelmed and making a list of things to learn instead of just doing it. This runs contrary to the Fast.ai principle of top down learning. For me there is a fear of failure in learning and/or establishing a career in data sience.
Yet everyone starts from somewhere and I don’t believe its possible to go from zero to hero in a few weeks. Consistent effort is the recipe for success. Some people find success more quickly, others it takes longer. Persistence is key.
As noted in my first blog post, I’ve resisted starting a blog even though it is an excellent way to share and learn. As I learn I hope to share perspectives that are suited towards people like me; those that are always learning and like to relate to things common sense terms. Lets get started!
The basics
What is deep learning and what is it all about?*
- In normal human speak, deep learning is an evolution and subset of machine learning.
- Deep Learning (DL) is centered around something called neural networks.
- Neural nets are a type of machine learning model architecture, which in theory permit a universally flexible function to approximate any relationship of observations to outcomes.
- A machine learning model is a general way to solve a problem. For example, given some data and some label that it belongs to, e.g. demographic data (features) that maps to what your income might be (target), we try to create a model which “learns” how X (features) maps to y (target).
- A model architecture is the math behind this process. Neural nets are flexible because they use clever math to create and learn values of hidden parameters that allow us to go from X -> y.
- Do you need to know the details beyond this? Yeah, you do. But not yet. Don’t worry about it!
Can deep learning be easy?
- Jeremy Howard says it can be learned by doing, and some things that were beyond difficult a decade ago are trivial today.
- It is not easy, however, nor is it quick to learn. Practice on a regular basis and you will accumilate knowledge.
What is a simple way to train a model?
First of all, do yourself a favor and don’t try to write things from scratch. Use Fastai or another library which can abstract the details and boilerplate code. Second, create a model! This will be a computer vision model that classifies species of houseplants. Pick some topic that interests you and solve a trivial problem.
- Here is the repo behind this app, hosted on huggingface spaces here
- Steps:
- get data: web scrape from duck duck go
- preprocess data
- train model
- evaulate result
- create a Gradio app: you don’t need to do much!
- publish model to Huggingface Spaces: use git or even the file upload if git sounds too hard right now
The app
Parting thoughts
Creating a project like the above is relatively straightfoward, but I totally understand how it can seem hard at first. Getting an error or trying to figure out how something works can be a tedious process, but you can do it. It is challenging to learn, and easy to get discouraged. But everyone starts somewhere, and you learn by doing. Stay positive and patient!