Skip to content
All subjects

DeepLearning.

Understand how neural networks turn numerical inputs into learned representations and useful predictions.

Modules
6
Topics
36
A layered neural networkInput nodes connect through two learned hidden layers to output nodes.INPUTLEARNED REPRESENTATIONSOUTPUT

0 of 36 complete

Contents

Introduction to Deep Learning

Deep learning is a part of machine learning that uses neural networks with several layers. These layers learn useful patterns directly from examples.

Start With the Main Idea

A machine-learning model learns a relationship between input data and a target. Deep learning does the same job, but it uses a layered neural network to build the relationship.

The word deep refers to the number of learned layers between the input and output. It does not mean that the model thinks like a person or understands the world in the human sense.

Deep learning pipeline where input pixels become simple patterns, useful features, and a final house prediction
Deeper layers combine simpler patterns into representations that are useful for the final prediction.

AI, Machine Learning, and Deep Learning

Artificial Intelligence is the broad goal of making computers perform tasks that appear intelligent. Machine Learning is one way to reach that goal by learning patterns from data. Deep Learning is a family of machine-learning methods based on layered neural networks.

A deep-learning model is therefore also a machine-learning model. The terms are related, but they are not interchangeable.

AreaMain ideaExample
Artificial IntelligenceBroad field of intelligent computer behaviourA system that plans a route
Machine LearningLearns a pattern from examplesA model that predicts house prices
Deep LearningUses layered neural networksA network that recognizes objects in images

Traditional Machine Learning and Deep Learning

In many traditional machine-learning systems, people decide which useful features to calculate before training. A deep network can learn several levels of features from the supplied numerical input.

This is a difference in approach, not a strict rule. Traditional models can also learn representations, and deep-learning projects still require people to prepare data and choose a useful objective.

QuestionTraditional MLDeep Learning
FeaturesOften designed or selected by peopleMany features learned through layers
Common dataStructured tablesImages, text, audio, and other complex data
Model depthUsually fewer learned transformationsUsually several learned transformations

What Is a Learned Representation?

Raw data is often not in the most useful form for a prediction. A representation is a useful internal description of that data.

For an image, early layers may respond to edges. Later layers may combine edges into shapes. Deeper layers can combine shapes into object parts. The final layer uses these learned features to make a prediction.

The important point is that the programmer does not manually write every feature rule. Training adjusts the network so that useful features emerge from the data and the learning objective.

When Deep Learning Is Useful

Deep learning is especially useful when the data has complex structure and enough useful examples are available. Images, audio, text, and long sequences are common cases.

It is not automatically the best choice. A small structured table may be handled well by linear models or tree-based models. These models can train faster and may be easier to explain.

Deep learning is often useful
A simpler model may be better
Large image, audio, or text dataset
Small tabular dataset
Complex patterns must be learned
A clear simple relationship is enough
Compute and training time are available
Fast training and explanation are priorities

Training and Inference Are Different Stages

During training, the network makes predictions, measures error, and adjusts its parameters. During inference, the trained parameters stay fixed while the network produces an output for a new input.

Validation and test examples check whether the learned pattern works on data that did not update the parameters. A good training score alone is not enough.

Training
Inference
Uses labelled or otherwise prepared examples
Uses a new input
Calculates error and updates parameters
Does not normally update parameters
Can take many repeated passes
Usually produces one requested result

Important Limitations

A neural network learns statistical patterns in its training data. It can repeat bias, use accidental shortcuts, and become confident for unfamiliar inputs.

A high test score also does not prove that a model is safe for every situation. The test data must represent the real task, and important failures must be studied separately.

  • Training can require a large amount of data and computation.
  • The learned reasoning can be difficult to explain.
  • Biased or incorrect data can produce harmful predictions.
  • Inputs that differ from training data can cause unreliable outputs.

Practice: Choose the Right Starting Point

The goal is not to choose the most complicated model. The goal is to choose a model that fits the data and task.

Problem 01

Small tabular dataset

A bank has 1,200 rows with ten clearly defined numerical features and needs an explainable baseline. Should it begin with a deep neural network?

  1. 01Identify the data: a small structured table.
  2. 02Identify the requirement: the result should be explainable.
  3. 03Compare the cost: a deep model adds complexity without a clear need.

Answer

No. Begin with a simpler baseline such as logistic regression or a tree-based model, then compare alternatives honestly.

Problem 02

Large image collection

A factory has hundreds of thousands of labelled product images and wants to recognize visual defects. Is deep learning a reasonable choice?

  1. 01The input is unstructured image data.
  2. 02Visual defects may require many learned patterns.
  3. 03A large labelled dataset is available.

Answer

Yes. A deep vision model is a reasonable candidate, but it must still be compared with a baseline and tested on realistic images.

How a deep-learning system learns

  1. 01Convert each example into numerical input values.
  2. 02Pass the values through a stack of layers to produce a prediction.
  3. 03Compare the prediction with the correct target using a loss function.
  4. 04Calculate how each parameter affected the loss.
  5. 05Adjust the parameters to reduce future error.
  6. 06Repeat over many examples and validate on data not used for updates.

Example

Recognizing a handwritten digit

The input layer receives pixel values. Early layers learn small strokes and edges. Later layers combine them into loops and digit shapes. The output gives a score or probability for each digit from 0 to 9.

A common mistake

Deep learning does not remove the need for data preparation, evaluation, or human judgment. It learns useful features, but only from the data and objective it is given.

Actions for Introduction to Deep Learning