Skip to content
AI & MLbeginner

What is deep learning?

Updated Nov 30, 20263 min readBased on official documentation
What is deep learning?

In short

Deep learning is a way of training computer programs called neural networks that have many layers of simple processing units. Each layer turns its input into a slightly more useful form, so the network can learn patterns, such as shapes in photos or words in speech, directly from example data.

Deep learning is a branch of machine learning. Machine learning means teaching a computer to find patterns in data instead of writing every rule by hand. Deep learning uses a specific kind of model called a neural network, and the word "deep" refers to the many layers stacked inside that network.

How it works

A neural network is built from small units called neurons. Each neuron receives some numbers, multiplies each one by a weight, adds the results together, and then passes the total through an activation function. The activation function decides what the neuron sends onward. Common examples are ReLU and sigmoid.

Without activation functions, a network could only learn simple, straight-line relationships. With them, the network can learn curved and complex relationships between the input features and the answer it should produce. This is what makes it possible to recognize a cat in a photo or translate a sentence.

Neurons are grouped into layers. The first layer receives the raw input, such as the pixels of an image. Each later layer receives the output of the layer before it. Early layers tend to pick up simple details, and deeper layers combine those details into bigger ideas. The network is not told what these details are. It works them out during training.

How training works

At the start, the weights in the network are set to rough values, so its predictions are poor. Training means showing the network many labeled examples, comparing its guess with the correct answer, and then adjusting the weights a little to reduce the error. This adjustment step is usually done with an algorithm called gradient descent. Repeating it over millions of examples gradually improves the model.

Training a deep network needs a lot of data and a lot of computing power. That is why deep learning took off only after large datasets and fast hardware became common.

Hardware that helps

Deep learning relies on many matrix calculations that can run at the same time. A general-purpose processor, or CPU, can do these calculations, but it is slow for this job. Accelerator chips are designed for exactly this kind of work. Graphics processing units (GPUs) were first built to draw images, but their many small cores also suit neural networks. Google's Tensor Processing Units (TPUs) are built specifically for deep learning. Both can speed up training and the later step of using a trained model, called inference.

When to use it

Deep learning works best on problems with a lot of raw data and no simple rule that describes the answer. Image recognition, speech recognition, and language translation are common examples. It is usually a poor first choice for small datasets. In those cases, simpler models such as linear regression or decision trees are often easier to train, easier to explain, and cheaper to run.

Before you start, ask three questions. Do you have enough labeled examples? Can you afford the computing time? Do you need to explain every decision the model makes? If the answer to the last question is yes, a simpler model may be the better fit.

Common mistakes

A frequent mistake is adding layers without checking whether the model actually improves. More layers mean more weights to train, which can lead to overfitting. In overfitting, a model memorizes its training examples and performs badly on new data. Always measure performance on a separate test set.

Another mistake is judging a model by accuracy alone. Accuracy is the share of predictions that were correct. It can look high even when the model is useless, for example when one answer is far more common than the others. Precision and recall often give a clearer picture.

Beginners also sometimes skip the basics of their data. A deep network cannot fix messy or mislabeled examples. Cleaning the data usually does more for results than adding another layer.

Where to go next

The Google Machine Learning Glossary explains many of the terms used in this field, including activation functions, accelerator chips, and accuracy. It is a good place to check any word you do not recognize while you read further. Once the basic terms feel familiar, try training a small neural network on a public dataset with a beginner-friendly framework. Hands-on practice makes the ideas above much easier to remember.

FAQ

Is deep learning the same as machine learning?

No. Deep learning is one part of machine learning. It uses neural networks with many layers, while other machine learning methods use simpler models.

Do I need a GPU to learn deep learning?

Not to start. Small models can train on a regular CPU. A GPU or TPU becomes important when you work with large datasets or big networks, because it speeds up the calculations a lot.

What is an activation function?

It is a rule that a neuron applies to its weighted sum of inputs before passing the result on. It lets the network learn curved and complex patterns instead of only straight-line ones.

Why is it called deep learning?

The name comes from the many layers of neurons stacked in the network. A network with more layers is called deeper.

Sources

This page is based on the official documentation below. Read it for full detail.

Deep learning — official documentation ↗
blozhikDeveloper news from across the web, explained. Every story links to its original sources.