10 steps on the road to Deep Learning (part 1)

One of the questions I often get after my talks is: “I’m a developer. How can I get started with this stuff?”. Here’s how I worked my way into Deep Learning. By no means am I claiming that this is “The Way”, if such a thing even exists.

In this post and the next, I’ll go through 10 steps that will hopefully help you learn in the right order and at your own pace.

I will also share some commented resources (MOOCs, books, blogs, etc.) at the end of the second post.

Saddle up!

I’m just a Hobbit but I’ll have you, gradient descent!

1— You can do it

A lot of people fear that Machine Learning (ML) and Deep Learning (DL) are too complicated for them and that they’re lacking skills to even get started.

No, no and no. If I did it, so can you.

Your first goal should be to understand what this technology is, what it can or cannot do and how you can use it in our own applications. They are plenty of data sets, algorithms and models available off the shelf. You should start by figuring out what these Lego blocks are and how you can combine them to start building cool stuff. Save the nitty-gritty details for later: isn’t this how we work with code anyway?

Tip #1: DL is not dark magic. It’s code. Treat it as such: no more, no less.

2- Ignore Math (for now)

Forward propagation, backward propagation, loss functions, gradient descent and what not. The Math and jargon are pretty overwhelming at first.

Yes, Math is the foundation of ML. No, it should not be your starting point. Who wants to go through hours of statistics and algebra before writing even one line of code? Not me.

This is typically how you kickstart the training process in a DL library:

model.train(data, labels, loss_function, optimizer)

You can either spend weeks understanding the underlying Math, or — for a while — you can just accept that it works the way it does and move on.

Using a black box approach is a great way to get started with minimal angst. Over time, you’ll build a better understanding on how each block works and you’ll be able to go deeper. But not now. Peel the DL onion layer by layer.

Tip #2: abstraction is your friend. Treat anything you don’t understand as a black box and focus on interfaces.

3 — Ride the snake

We established that DL is code. So, what language should you master?

If you have to pick ONE, it’s Python, hands down. Chances are, you already know it ;) Not only is it the dominant language for Data Science, ML and DL, it’s also a useful language for pretty much everything else, as illustrated by the Python AWS SDK aka boto3.

If you haven’t used it in a while, or if you’re learning it, make sure you have a really good understand of lists, tuples, dictionaries, etc. These data structures are everywhere in DL code and you’ll definitely struggle if you‘re not comfortable with them.

In addition, to the core language, I would very strongly suggest that you also learn the basics of these Python tools:

  • Mathplotlib: plotting library
  • Numpy: scientific computing, especially useful for array and matrix manipulation.
  • Pandas: data analysis library.
  • OpenCV: image processing library.
  • Jupyter: web application to build Python notebooks.

Tip #3: Invest in Python 3 and enjoy a lifetime of dividends.

4 — Walk before you run

I’ll spare you the Venn diagram on AI, ML and DL. Still, DL is a subset of ML, so shouldn’t you know a bit about ML before jumping into DL? :)

You should definitely spend time learning the ropes of “traditional” ML: data sets, main problem classes (regression, classification, clustering, etc), popular algorithms for each problem class, etc. Neural networks are just one technique and there are many more. Having a wider understanding of ML will help you see when to use DL or not.

It’s a good thing that you learned Python, because now you can get introduced to ML with scikit-learn. This library is easy to use and supports a large number of ML algorithms: definitely the more gentle way to learn what they are and what they’re good at.

If you’re more advanced (or more ambitious), you could also take a look at PySpark (Spark’s Python API) and Spark MLlib (Spark’s Machine Learning library). Spark’s powerful data management features are an asset if you have to deal with large data sets. They’re overkill during your learning phase, but keep them in mind as you start building production apps.

Tip #4: First and foremost, Deep Learning is Machine Learning. Learn them in the right order.

5 — Pick a library (and don’t look back)

Read my lips: at this point, it doesn’t really matter which DL library you pick… As long as it has a Python API and is friendly enough to hide the nasty low-level stuff, you’ll be fine.

So, in no particular order, here are some options:

A word of warning: Theano is very low-level and going into maintenance mode. Tensorflow is low-level, hard to learn and known to generate quite a bit of frustration. I would not recommend these to a beginner.

Check out the documentation, run some tutorials, make up your own mind. One of these libraries will feel more comfortable to you. That’s the one you should pick.

Tip #5: Ignore the hype. Use the library that will help you learn faster.

That’s the end of part 1. Food for thought, hopefully.

If you liked this post, why not share it on Facebook, Twitter or LinkedIn for more people to enjoy? Thank you :)

In part 2, we’ll look at the five last steps and I’ll share some commented resources to help you stay on the right track.

6 — It’s code, so code!

7 — Welcome to the jungle

8 — Stop worrying and learn to love Math

9 — Stare into the abyss

10 — D^Keep learning

The soundtrack to this post was Motörhead’s Live at Hammersmith. RIP Fast Eddie Clarke (1950–2018).



Chief Evangelist, Hugging Face (https://huggingface.co)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store