DEEP LEARNING LESSON 2 NEURAL NETWORKS

Hidden Layers

Hidden layers are the layers between the input layer and the output layer. They process information from the input and help the neural network learn patterns.

In simple words

The input layer receives the data, hidden layers process the data and learn patterns, and the output layer produces the final result.

Where Are Hidden Layers?

A simple neural network can be viewed like this:

FIRST
Input Layer
MIDDLE
Hidden Layer
LAST
Output Layer

Hidden layers are called "hidden" because they are not directly visible as the input or final output of the model.

Why Do We Need Hidden Layers?

Real-world problems are often more complicated than simply connecting an input directly to an answer.

Hidden layers allow the network to process the input in multiple stages and learn more complex patterns.

Raw Input
Simple Patterns
More Complex Patterns
Prediction

Simple Example — Student Prediction

Suppose we want to predict whether a student will pass an exam.

The input might contain:

Hours Studied
Attendance
Previous Score

The input layer receives these values.

The hidden layer then processes those values and can learn relationships between them.

INPUT
Hours Studied
Attendance
Previous Score
HIDDEN
Neuron 1
Neuron 2
Neuron 3
OUTPUT
Pass / Fail

The important point is that the hidden layer does not simply copy the input. It transforms and processes the information before it reaches the output layer.

Can a Network Have More Than One Hidden Layer?

Yes. A neural network can contain multiple hidden layers.

INPUT
Input Layer
HIDDEN 1
Hidden Layer 1
HIDDEN 2
Hidden Layer 2
OUTPUT
Output Layer

Each hidden layer receives information from the previous layer and passes processed information to the next layer.

Hidden Layers Learn Patterns Step by Step

A useful way to understand hidden layers is to think about learning patterns in stages.

For example, imagine a neural network processing an image of a face.

Image Pixels
Basic Patterns
Shapes
Face Features
Face

The exact behavior depends on the architecture and training, but this is a useful beginner-friendly way to understand why multiple layers can help a network learn increasingly complex representations.

Hidden Layers Contain Neurons

A hidden layer is not a single neuron. It normally contains multiple neurons.

INPUT
Input 1
Input 2
Input 3
HIDDEN LAYER
Neuron 1
Neuron 2
Neuron 3
Neuron 4
OUTPUT
Prediction

Each neuron performs calculations on information received from the previous layer.

We will study exactly how a neuron performs those calculations later in this lesson.

How Information Moves Through Hidden Layers

Information flows from one layer to the next.

Input Layer
Hidden Layer 1
Hidden Layer 2
Hidden Layer 3
Output

Each layer transforms the information before passing it forward.

How Many Hidden Layers Do We Need?

There is no single number that works for every problem.

A simple problem might work with a small network, while a complicated problem may require a much deeper architecture.

Two examples

Simple problem: A small dataset with a straightforward relationship may need only a small neural network.

Complex problem: Image, speech, or language tasks can require networks with many layers.

More layers does not automatically mean better

Making a network deeper increases its complexity. The architecture must match the problem, data, and amount of training available.

Why Is This Called Deep Learning?

The word "deep" generally refers to using multiple layers in a neural network.

INPUT
Input
DEEP NETWORK
Hidden 1
Hidden 2
Hidden 3
Hidden 4
OUTPUT
Prediction

More hidden layers can allow a network to build increasingly complex representations from the input.

Hidden Layer vs Hidden Neuron

Term
Meaning
Hidden Layer
A group of neurons at the same stage of the network.
Hidden Neuron
One computational unit inside a hidden layer.

For example, a hidden layer could contain:

Hidden Layer
    ↓
    Neuron 1
    Neuron 2
    Neuron 3
    Neuron 4

Complete Neural Network Flow

INPUT
Features
HIDDEN 1
Process
HIDDEN 2
Process
OUTPUT
Prediction

So the overall idea is:

Input
  ↓
Hidden Layer
  ↓
Hidden Layer
  ↓
Output

What You Should Remember

Hidden layers sit between the input and output layers. They contain neurons that process information and allow the network to learn useful patterns. A neural network can have one or many hidden layers.

QUICK CHECK

Check Your Understanding

What is a hidden layer?
A layer between the input layer and output layer that contains neurons for processing information.

Why is it called hidden?
Because it is an internal layer rather than the input or final output of the network.

Can a neural network have multiple hidden layers?
Yes. A network can have one or many hidden layers.

What is inside a hidden layer?
Neurons that process information received from the previous layer.

NEXT TOPIC

Output Layer

Next, we will learn about the output layer and how a neural network produces its final result.