The world’s leading publication for data science, AI, and ML professionals.

How anyone can get started with Deep Learning on Windows

Create your own Visual Recognition Application within a day.

Photo by Jason Strull on Unsplash
Photo by Jason Strull on Unsplash

Deep Learning and artificial intelligence are one of the hottest topics in the world today. We see an ever-increasing number of applications that employ deep learning: facial recognition, speech recognition (Siri, ‘OK Google’, Alexa), Self-Driving Cars, and the list goes on and on. So as a student, fresh employee, team manager, senior management, we get curious: Will this ever-rising wave of AI technology eventually make my job or future career less relevant?

That was actually how I stumbled upon the world of Deep Learning years ago, and ended up where I am today: pursuing a postgraduate degree in this field of research. We all have been conditioned to learn things in a certain way: search for information online, sign up for courses, watch tutorials on YouTube. However, the massive and ever-increasing amount of information on this subject is scary, and many of us give up on the pursuit of new, relevant skills quickly.

Here I will share my experience on what I think is the easiest and quickest ways to get started with Deep Learning, and be able to create your own Visual Recognition Application within a day. This is my personal opinion after doing dozens of online courses on Deep Learning, Data Science, Machine Learning etc. What I recommend is fast.ai, and it is suitable for people of any skill level! (p.s. Minimally, you need to have a google account – who doesn’t)


What is fast.ai

This is a software package that is coded on top of PyTorch, a Deep Learning Framework coded in the Python Language. Don’t worry if you didn’t understand a single part of that sentence, the materials we are talking about in the online course do not technically require any coding knowledge. The creators of fast.ai have published their online learning course which can be accessed at https://course.fast.ai/. The first three lessons (5 hours) will take you through the steps to deploying your own Deep Learning application!

Photo by Alexander Sinn on Unsplash
Photo by Alexander Sinn on Unsplash

For more advanced practitioners, you can continue on with the course to learn the more complex details about Deep Learning. I will probably be publishing another series that goes through the key pointers and notes from each lesson in the course, but let’s save that for another day.


Installation and Setup… the most painful step of learning any new technology

Thankfully, we can use fast.ai without any installation on your computer, thanks to the wonders of cloud computing! Hence the advantages for Windows users, since most deep learning frameworks are built to run in Linux. Here are the options that are optimised for the fast.ai package, simply skip to the section you prefer or read through to find out the differences! I have only listed the options that are completely free. (No worries, fellow students)

  1. Google Colab (Requires Google Account)
  2. Installation on your local machine (Windows Tested, only recommended for advanced users)
  3. Paperspace Gradient

Google Colab

Colab is a service launched by Google that provides free GPU(!!) access through notebooks. To get started with fast.ai on Colab, simply access the notebooks using the following links (For advanced users who wish to continue on with the course, do follow the instructions at https://course.fast.ai/):

It will be as simple as going through the three notebooks while watching the first 3 lesson videos of the course! However, here are the things to take note when using Colab:

  1. Start off by clicking on File > Save a Copy in Drive > Sign in (If you haven’t already). This ensures that any changes you make to the notebook can be revisited from your own Google Drive account.
Make a Copy of the Notebook
Make a Copy of the Notebook
  1. Making a copy should redirect you to the copied notebook stored in your own Google Drive storage. To access it again, simply head to My Drive > Colab Notebooks. Copied notebooks will be stored in this folder by default.
  2. To open, double click the notebook of interest and click on open with Google Colaboratory. Easy!
Accessing your notebooks from Google Drive
Accessing your notebooks from Google Drive
  1. For most Deep Learning Frameworks, GPUs can really speed up the computation time. Thankfully, Google Colab provides free GPU usage (up to 3GB of RAM). Make sure the runtime type in Colab is set to GPU.
Changing runtime type to GPU
Changing runtime type to GPU
  1. Now you’re ready! Simply follow the video lectures on https://course.fast.ai/ and you can become a Deep Learning student in no time.

Installing on Windows

Installing on your own machine gives you more flexibility. However, this is only recommended for advanced users. fast.ai recommends installations on Linux-based OS, but many of us do not want to go through the hassle of dual-booting or running a Virtual Machine. I am personally running the fast.ai package on a Windows 10, 64-bit machine using the following steps:

  1. Install Miniconda (Anaconda works fine too, if you already have that installed). Make sure to select the correct operating system, and choose the option for Python 3.8.
  2. Fire up the Anaconda Prompt from the Windows Search bar.
  1. Run the following command to install Fastai, then enter ‘Y’ when prompted to commence downloading:
conda install -c fastai -c pytorch fastai jupyter notebook
  1. After installation, run the following command in the Anaconda Prompt to start a local Jupyter Notebook Server.
jupyter notebook
  1. A window should pop-up in your default browser, or you can access it by typing:
http://localhost:8888/?token='find_under_conda_prompt'
  1. Download a copy of the fast.ai notebooks from https://github.com/fastai/fastai
  2. Access the notebooks and you’re done!

It’s really simple to get started with Deep Learning. Now, almost anyone can do it with the help of comprehensive courses and frameworks. If you have any questions, or if any of the steps do not work for you, feel free to leave a comment below!


References

Practical Deep Learning for Coders

fastai/fastai

Google Colaboratory

fastai: A Layered API for Deep Learning


Related Articles