Teaching yourself deep learning is a long and arduous process. You need a strong background in linear algebra and analysis, good Python programming skills and solid knowledge of data science, machine learning and data engineering. Even then, it can take more than a year to get to the point where you can start applying Deep learning for real problems and possibly a job as a deep learning engineer.
However, knowing where to start can go a long way in shortening the learning curve. If I had to learn deep learning with Python one more time, I would start with it Grokking Deep Learning, written by Andrew Trask. Most books on deep learning require a basic knowledge of machine learning Concepts and Algorithms. Trask’s book teaches you the basics of deep learning without any prerequisites other than basic math and programming skills.
The book doesn’t make you a deep learning assistant (and it makes no such claims), but it puts you in a path that makes it much easier to learn from more advanced books and courses.
Building an artificial neuron in Python
Most deep learning books are based on one of several popular Python libraries such as TensorFlow, PyTorch, or Keras. In contrast, Grokking Deep Learning teaches you deep learning by creating everything from scratch, line by line.
You start by developing a single artificial neuron. the most basic element of deep learning. Trask walks you through the basics of linear transformations, the main computation of an artificial neuron. Then you implement the artificial neuron in simple Python code without using special libraries.
This is not the most efficient way to do deep learning because Python has many libraries that take advantage of your computer’s graphics card and the parallel processing power of your CPU to speed up the calculations. But writing everything in vanilla python is excellent for learning the pros and cons of deep learning.
[Read: How Polestar is using blockchain to increase transparency]
in the Grokking Deep Learning, your first artificial neuron, takes a single input, multiplies it by a random weight, and makes a prediction. Then you measure the prediction error and apply a gradient descent to balance the weight of the neuron in the right direction. With a single neuron, a single input, and a single output, the concept becomes very easy to understand and implement. You will gradually add more complexity to your models by using multiple input dimensions, predicting multiple outputs, applying batch learning, adjusting learning rates, and much more.
And you implement each new concept by gradually adding and changing pieces of Python code that you wrote in the previous chapters, and gradually creating a list of functions with which you can make predictions, calculate errors, fix apply and much more. As you move from scalar to vector computation, you switch from vanilla python operations to Numpy, a library that is particularly good for parallel computing and very popular with the machine learning and deep learning community.
Deep neural networks with python
With the basic building blocks of artificial neurons, you start creating them deep neural networks, which is basically what happens when you stack multiple layers of artificial neurons on top of each other.
As you create deep neural networks, you will learn and apply the activation functions to break the linearity of the stacked layers and create classification outputs. Here, too, you implement everything yourself with the help of numpy functions. You will also learn to calculate gradients and propagate errors across planes to distribute corrections to different neurons.
Once you become familiar with the basics of deep learning, you can learn and implement more advanced concepts. The book includes some popular regularization techniques like early stop and exit. You can also make your own version of Convolutional Neural Networks (CNN) and recurring neural networks (RNN).
At the end of the book, you’ll pack everything into a full Python deep learning library and create your own class hierarchy of levels, activation functions, and neural network architectures (you need object-oriented programming skills for this part). If you’ve worked with other Python libraries like Keras and PyTorch, you will be fairly familiar with the final architecture. If you haven’t done this, it will be much easier for you to familiarize yourself with these libraries in the future.
And throughout the book, Trask reminds you that practice makes perfect. He encourages you to code your own neural networks by heart without inserting anything.
The code library is a bit cumbersome
Not all over Grokking deep learning is perfect. In one Previous post, I said that one of the most important things that defines a good book is the code repository. And Trask could have done a much better job in this area.
The GitHub repository from Grokking Deep Learning is abundant with Jupyter Notebook files for each chapter. Jupyter Notebook is an excellent tool for learning Python machine learning and deep learning. However, the strength of Jupyter is that it breaks your code into several small cells that you can run and test independently. Some Grokking Deep Learning’s notebooks consist of very large cells with large chunks of uncommented code.
This becomes particularly problematic in the later chapters, where the code becomes longer and more complex and it becomes very difficult to find your way around the notebooks. Basically, the code for teaching materials should be broken down into small cells and include comments in key areas.
Trask also wrote the code in Python 2.7. While he made sure the code would work fine in Python 3, it incorporates old coding techniques that are out of date among Python developers (such as using the “for i in range (len (array))” paradigm to iterate over an array).
The broader picture of artificial intelligence
Trask did a great job putting together a book that could serve both newbies and seasoned Python deep learning developers looking to fill in the knowledge gaps.
But as Tywin Lannister says (and any engineer will agree), “There’s a tool for every job and a job for every tool.” Deep learning is not a magic wand that can solve every AI problem. In fact, for many problems, simpler machine learning algorithms like linear regression and decision trees will work just as well as deep learning, while for others rule-based techniques like regular expressions and a couple of if-else clauses outperform both.
The point is, you need a full arsenal of tools and techniques to solve AI problems. Hopefully Grokking Deep Learning will help you get started on acquiring these tools.
Where are you going from here I would definitely recommend reading a detailed book on Python deep learning such as Deep learning with PyTorch or Deep learning with Python. You should also deepen your knowledge of other machine learning algorithms and techniques. Two of my favorite books are Hands-on machine learning and Python machine learning.
You can also gain a lot of knowledge by posting on machine learning and deep learning forums like this r / MachineLearning and r / deeplearning Subreddits that AI and Deep Learning Facebook group or by following AI researchers on Twitter.
The AI universe is huge and growing fast and there is a lot to learn. If this is your first book on deep learning, this is the beginning of an amazing journey.
This article was originally published by Ben Dickson on TechTalks, a publication that examines technology trends, how they affect the way we live and do business, and what problems they solve. But we also discuss the evil side of technology, the darker effects of the new technology, and what to look out for. You can read the original article here.
Published on February 17, 2021 – 14:00 UTC
Comments are closed.