Skip to content

How I Grokked Deep Learning

Published: at 05:00 PM

I was today years old when I found out that the phrase ‘going off on a tangent’ is related to the mathematical concept since it means the line is perpendicular to another.

Grokking Deep Learning by Andrew Trask

That’s exactly what I did 3 weeks ago when I started working through the book ‘Grokking Deep Learning’ by Andrew Trask.

The wonderful world of deep learning

This book was my gateway drug into the world of AI/Machine Learning (and a good one too). I stumbled upon it whilst I was going down one of my usual rabbit holes of exploring different areas of computing after being told: “Zain, you should get into machine learning” by one of my cousins. Now usually, advice like this goes in one ear and out the other but I’m glad it took a wrong turn and missed the exit out of my brain.

To sum my experience up with the book, it was interesting, engaging, and tedious at times but rewarding in the end. I am now quite confident that I can speak to anyone about deep learning and hold an interesting conversation. In fact, I did just that this week, when I spoke to a PhD candidate who said her research was in computer vision. We geeked out over a library called fast.ai and collectively threw shade at TensorFlow’s volatility (PyTorch FTW). At some point, she even advised me to upload my work to GitHub to help showcase my abilities to employers.

Shhh…

However, I have a secret to tell you: I’ve never used PyTorch. I was able to talk about it though, because the penultimate chapter in the book shows you how to create your own low-level deep learning framework from scratch using just pure Python and numpy and with an interface modelled after PyTorch… But hey, I’m getting ahead of myself.

You get started by being shown how to create a simple machine-learning model. Then, as the chapters progress, you get introduced to a basic deep learning model, convolution neural networks and finally natural language processing. Dotted between those are various chapters discussing backpropagation, batching, and activation functions. These words may mean nothing to you, but the point is that Trask builds your understanding up from the very essence of neural nets to an entire framework. Moreover, all of that is in pure Python. This gave me a STRONG fundamental understanding of the underlying concepts.

My experience with the book

The way I worked through the book was by typing out the code snippets on my machine and running it. I then tweaked some of the parameters and saw what happened hoping to get a better feel for it. At one point, I had to even draw out matrices on paper to brush up on matrix multiplication and what it means to transpose a matrix. Working this way, although tedious at times, meant that I was typing a lot of the same code over and over again. This made me internalise the essential patterns that formed deep learning.

All in all, I would 100% recommend ‘Grokking Deep Learning’ by Andrew Trask to anyone, new or old, looking to learn deep learning deeply.


Previous Post
Are you a frog or a rat? Solved by science.
Next Post
When did Python click for you in the last three years of uni?