Deep Learning Aids Insem Notes Pyq
Deep Learning Aids Insem Notes Pyq
Deep Learning is a subfield of Machine Learning that uses Artificial Neural Networks with multiple
layers to learn patterns and representations from large amounts of data automatically.
It is called “deep” because the neural network contains many hidden layers between the input and
output layers.
Deep learning models are inspired by the structure and functioning of the human brain, where neurons
process information and pass it to other neurons.
• Self-driving cars
• Medical diagnosis
• Language translation
Deep learning works through a neural network structure consisting of three main layers:
1. Input Layer
2. Hidden Layer(s)
3. Output Layer
Example structure
Input → ○ ○ ○
│
Hidden → ○ ○ ○ ○
│
Hidden → ○ ○ ○
│
Output → ○
1. Input Layer
Example
For image recognition:
Example inputs:
• Age
• Salary
• Pixel values
• Audio signals
2. Hidden Layers
2. Activation function
Mathematical representation:
Where
• xx = input
• ww = weight
• bb = bias
After this calculation, an activation function is applied to produce output.
Hidden layers help the model learn complex patterns in the data.
Example:
• In image recognition
3. Output Layer
Examples:
Example:
Example:
Image of a cat.
The input moves through the network from input layer → hidden layers → output layer.
Each neuron:
• adds bias
The predicted output is compared with the actual output using a loss function.
Example:
Step 4: Backpropagation
Purpose:
• Improve accuracy
Goal:
Process:
Prediction → 5
7. Conclusion
Deep learning is a powerful machine learning technique that uses multi-layer neural networks to
automatically learn patterns from large datasets. It works by processing data through input, hidden, and
output layers, adjusting weights using forward propagation and backpropagation to improve prediction
accuracy.
✅ If you want, I can also give you a short 1-page exam revision version of this answer (very easy to
memorize for Insem).
1. Introduction
Deep Learning is a powerful branch of machine learning that uses multi-layer neural networks to
automatically learn patterns from large datasets. It has achieved remarkable success in fields like image
recognition, speech processing, healthcare, and autonomous vehicles.
However, despite its powerful capabilities, deep learning also has some limitations and challenges.
Example:
In image recognition, the model automatically learns:
• edges
• shapes
• objects
Example:
A deep learning model can identify cats and dogs from images without manually defining features.
2. High Accuracy
Deep learning models provide very high accuracy, especially when working with large datasets.
Example applications:
• Face recognition
• Speech recognition
Example:
Systems like Google Photos automatically recognize people in images.
Deep learning works very well with large volumes of data and complex datasets such as:
• Images
• Videos
• Audio
• Text
Example:
Self-driving cars process thousands of images per second using deep learning.
4. End-to-End Learning
Deep learning can learn directly from input data to output prediction without many intermediate steps.
Example:
Speech recognition system
Deep learning performs extremely well with unstructured data, such as:
• Images
• Videos
• Natural language
Example:
Chatbots and translation systems like Google Translate use deep learning.
6. Continuous Improvement
Deep learning models improve their performance as more data becomes available.
Example:
Recommendation systems (Netflix, YouTube) improve as more user data is collected.
Problem:
If the dataset is small, the model may perform poorly.
Example:
Image recognition models may require millions of labeled images.
Requirements:
• GPUs
• Large memory
• High processing power
Example:
Training large models like language models can take days or weeks.
Deep learning networks contain many layers and parameters, which increases training time.
Example:
A deep neural network may require thousands of training iterations.
Deep learning models are often considered black box models, meaning it is difficult to understand how
they make decisions.
Example:
If a model predicts a disease from medical images, it may be hard to explain why the model made that
prediction.
5. Risk of Overfitting
Deep learning models can memorize training data instead of learning patterns, especially when the
dataset is small.
Example:
A model may perform well on training data but fail on test data.
• Learning rate
• Number of layers
• Number of neurons
• Batch size
Advantages Challenges
5. Conclusion
Deep learning is a powerful technique that provides high accuracy and automatic feature learning,
especially for complex tasks like image and speech recognition. However, it also faces challenges such
as high computational requirements, need for large datasets, and lack of interpretability. Despite
these challenges, deep learning continues to be one of the most important technologies in modern
artificial intelligence.
✅ If you want, I can also give you the next most common 10-mark PYQ from your syllabus like:
Deep Learning is widely used in many real-world applications because it can learn complex patterns
from large datasets. It is especially useful for handling unstructured data such as images, videos,
speech, and text.
Today, deep learning is used in many fields like healthcare, finance, transportation, entertainment, and
cybersecurity.
1. Image Recognition
Deep learning is widely used for image classification, object detection, and face recognition.
Deep neural networks such as Convolutional Neural Networks (CNNs) analyze images and identify
objects.
Example
Example:
Facebook automatically tags people in photos using face recognition.
2. Speech Recognition
Deep learning helps computers understand and convert human speech into text.
Example
• Voice assistants
• Speech-to-text systems
• Voice search
Examples:
• Siri
• Google Assistant
• Amazon Alexa
3. Natural Language Processing (NLP)
Deep learning enables machines to understand, interpret, and generate human language.
Example
• Chatbots
• Language translation
• Sentiment analysis
Example:
Google Translate uses deep learning to translate languages.
4. Self-Driving Cars
Deep learning helps autonomous vehicles understand the environment using camera and sensor data.
• roads
• pedestrians
• traffic signals
• other vehicles
Example
• Tesla
• Waymo
Deep learning is used in healthcare for disease detection and medical image analysis.
• X-rays
• CT scans
• MRI scans
Example
• cancer
• brain tumors
• diabetic retinopathy
6. Recommendation Systems
Deep learning is used to recommend products, movies, and content based on user preferences.
Example
Example:
If you watch action movies, Netflix recommends similar movies.
7. Fraud Detection
Deep learning models are used to detect fraudulent activities in financial systems.
Example
8. Robotics
Deep learning enables robots to learn tasks and interact with their environment.
Robots can:
• recognize objects
• navigate environments
Example
9. Cybersecurity
Deep learning helps detect cyber attacks and malware by analyzing network traffic patterns.
Example
• Malware detection
• Spam filtering
3. Summary Table
Application Description
4. Conclusion
Deep learning has transformed many industries by enabling machines to learn from large datasets and
perform complex tasks automatically. Its applications in healthcare, autonomous vehicles, image
recognition, and natural language processing are improving efficiency and accuracy in many real-world
systems.
✅ If you want, I can also give you the next important 10-mark question from your syllabus:
Enlist different hyper parameter in Deep Learning? Explain any two?What are Hyper parameters?
Explain any 2 in brief
1. Introduction
In deep learning, models learn from data by adjusting parameters (weights and biases) during training.
However, some settings must be defined before training the model. These settings are
called hyperparameters.
Hyperparameters control how the learning process happens, while parameters are learned
automatically during training.
2. Definition of Hyperparameters
Hyperparameters are the configuration variables that are set before training a neural network and
control the behavior and performance of the model.
They determine:
Unlike weights and biases, hyperparameters are not learned from the data.
1. Learning Rate
2. Regularization
3. Momentum
4. Sparsity
6. Batch Size
7. Number of Epochs
8. Activation Functions
(According to your syllabus, the important ones are Learning Rate, Regularization, Momentum,
Sparsity, Hidden Units.)
1. Learning Rate
Definition
The learning rate controls how much the model updates its weights during training.
Example
During training:
Choosing a good learning rate helps the model converge faster and achieve better accuracy.
Importance
2. Regularization
Definition
Overfitting happens when a model learns training data too well but performs poorly on new data.
Regularization adds a penalty term to the loss function to prevent the model from becoming too
complex.
Common Types
1. L1 Regularization
2. L2 Regularization
3. Dropout
Example
If a neural network has too many parameters, it may memorize the training data.
Regularization helps control the complexity of the model and improves generalization.
Importance
• Prevents overfitting
• Improves model generalization
5. Conclusion
Hyperparameters are important configuration settings that control the learning process of deep
learning models. Proper tuning of hyperparameters such as learning rate and regularization improves
the performance, accuracy, and stability of neural networks.
✅ If you want, I can also give you the next very important 10-mark PYQ from your syllabus:
1. Introduction
Backpropagation (Backprop) is a supervised learning algorithm used to train neural networks. It works
by calculating the error in the output and propagating it backward through the network to update the
weights.
The main objective of backpropagation is to minimize the loss (error) function by adjusting weights
using gradient descent optimization.
Backpropagation is widely used in Deep Neural Networks (DNNs) to improve prediction accuracy.
• Input Layer
• Hidden Layer(s)
• Output Layer
Simple diagram:
Flow of information:
3. Working of Backpropagation
1. Forward Propagation
2. Backward Propagation
Initially, all weights and biases in the neural network are assigned small random values.
Example:
w1 = 0.2
w2 = 0.5
w3 = 0.1
Input data is passed through the neural network layer by layer to compute the predicted output.
Mathematical representation:
z=w1x1+w2x2+...+wnxn+bz=w1x1+w2x2+...+wnxn+b
• Sigmoid
• ReLU
• Tanh
The predicted output is compared with the actual output using a loss function.
Example:
Actual Output = 1
Predicted Output = 0.7
• Cross-Entropy Loss
Using the chain rule of calculus, the algorithm calculates the gradient of the loss function with respect
to each weight.
wnew=wold−η∂L∂wwnew=wold−η∂w∂L
Where:
• ηη = learning rate
• LL = loss function
• ww = weight
5. Flow of Backpropagation
6. Example of Backpropagation
Input:
Process:
3. Error is calculated
8. Conclusion
✅ If you want, I can also give you the next very important 10-mark PYQ from your syllabus:
Enlist different optimization algorithm which is commonly used in deep learning? Describe any one.
1. Introduction
Optimization algorithms are used in deep learning to minimize the loss (error) function by updating the
weights of a neural network during training.
These algorithms help the model learn faster and reach the optimal solution by adjusting weights based
on gradients.
Optimization algorithms work together with gradient descent to improve model performance.
These algorithms are used to improve the efficiency and speed of training deep neural networks.
Definition
Stochastic Gradient Descent (SGD) is an optimization algorithm used to update the weights of a neural
network by calculating gradients using one training example at a time.
Instead of using the entire dataset, SGD updates weights after each training sample, which makes
learning faster.
Working of SGD
Where:
• ww = weight
• LL = loss function
• ηη = learning rate
Advantages of SGD
Limitations of SGD
4. Conclusion
Optimization algorithms are essential in deep learning because they help minimize the loss function and
improve model accuracy. Common optimization algorithms include SGD, AdaGrad, RMSProp, and
Adam. Among these, Stochastic Gradient Descent (SGD) is one of the most widely used methods for
updating neural network weights efficiently.
✅ If you continue sending PYQs, the next very likely 10-mark questions from your syllabus are:
1. Introduction
In deep neural networks, the backpropagation algorithm is used to update weights by computing
gradients of the loss function. However, during training of very deep networks, gradients may
become extremely small or extremely large.
Both problems make it difficult for deep neural networks to learn effectively.
Definition
The vanishing gradient problem occurs when the gradients become very small (close to zero) during
backpropagation. As a result, the weights of earlier layers in the network update very slowly or stop
updating completely.
This prevents the network from learning important patterns in the data.
Why it Happens
During backpropagation, gradients are multiplied repeatedly by small numbers (derivatives of activation
functions).
For example, activation functions like Sigmoid or Tanh produce derivatives between 0 and 1.
When many layers multiply these small values, the gradient becomes extremely small.
Simple Illustration
Output Layer
↓
Hidden Layer 3
↓
Hidden Layer 2
↓
Hidden Layer 1
↓
Input Layer
As the error moves backward through many layers, the gradient becomes smaller and smaller,
eventually approaching zero.
Solutions
Definition
The exploding gradient problem occurs when gradients become very large during backpropagation,
causing extremely large weight updates.
This makes the training process unstable and the model may fail to converge.
Why it Happens
When gradients are repeatedly multiplied by large numbers during backpropagation, their values grow
exponentially.
Illustration
Output Layer
↑
Large Gradient
↑
Hidden Layer 3
↑
Very Large Gradient
↑
Hidden Layer 2
↑
Extremely Large Gradient
Solutions
• Gradient Clipping
• Batch normalization
5. Conclusion
Vanishing and exploding gradients are common problems in deep neural networks that occur
during backpropagation. The vanishing gradient causes slow learning, while the exploding gradient
causes unstable training. Proper techniques such as ReLU activation, gradient clipping, and better
initialization help overcome these issues and improve the performance of deep learning models.
1. Introduction
An activation function is a mathematical function used in a neural network that determines the output
of a neuron. It introduces non-linearity into the model so that the network can learn complex patterns
from the data.
Without activation functions, a neural network would behave like a simple linear model and would not
be able to solve complex problems.
Activation functions are mainly used in hidden layers and output layers of deep neural networks.
Definition
The linear activation function simply returns the input value as the output.
Formula
Characteristics
• No non-linearity is introduced.
Example
Limitation
Definition
The sigmoid function converts input values into a range between 0 and 1, making it useful for
probability-based predictions.
Formula
Characteristics
• Output range: 0 to 1
• Smooth curve
Example
Spam detection:
• 0 → Not spam
• 1 → Spam
Limitation
• Causes vanishing gradient problem
Definition
The Tanh function is similar to sigmoid but outputs values between -1 and +1.
Formula
Characteristics
• Output range: -1 to +1
• Zero-centered output
Example
Limitation
Definition
The ReLU activation function outputs the input directly if it is positive, otherwise it outputs zero.
Formula
Characteristics
Example
Used in:
• Image recognition
Limitation
Negative inputs become zero (dead neuron problem).
Definition
The Softmax function converts outputs into probability values for multiple classes.
Formula
f(xi)=exi∑j=1nexjf(xi)=∑j=1nexjexi
Characteristics
Example
Image classification:
• Cat → 0.70
• Dog → 0.20
• Bird → 0.10
8. Summary Table
9. Conclusion
Activation functions are essential in neural networks because they introduce non-linearity, enabling the
model to learn complex relationships in data. Common activation functions such as Sigmoid, Tanh,
ReLU, Softmax, and Linear are widely used in deep learning depending on the type of problem being
solved.
✅ If your Unit-2 exam questions continue, the next very common 10-mark questions are:
1. Introduction
In machine learning and deep learning, the goal of a model is to learn patterns from training data and
perform well on unseen data. However, sometimes models either learn too little or too much from the
training data.
• Underfitting
• Overfitting
The Bias–Variance Trade-off explains how to balance these problems to achieve good model
performance.
2. Underfitting
Definition
Underfitting occurs when a model is too simple to capture the underlying pattern of the data. As a
result, it performs poorly on both training data and test data.
Characteristics of Underfitting
Example
Suppose we want to predict house prices using only one feature (house size) while ignoring other
important features like:
• location
• number of rooms
• age of house
The model will not learn properly and predictions will be inaccurate.
Causes of Underfitting
Solutions
• Reduce regularization
3. Overfitting
Definition
Overfitting occurs when a model learns the training data too well, including noise and unnecessary
details. As a result, it performs very well on training data but poorly on new data.
Characteristics of Overfitting
Example
If a deep neural network has too many layers or parameters, it may memorize the dataset instead of
learning patterns.
Example:
A model trained to recognize handwritten digits may memorize training images but fail on new
handwritten digits.
Causes of Overfitting
• Lack of regularization
Solutions
• Apply dropout
• Use more training data
• Early stopping
4. Bias–Variance Trade-off
Definition
The Bias–Variance Trade-off is the balance between bias and variance that determines how well a
machine learning model performs.
Bias
Bias refers to the error caused by overly simple models that cannot capture the true pattern of data.
Example:
Using a linear model for complex data.
Variance
Variance refers to how much the model's prediction changes with different training data.
Example:
A model that perfectly fits training data but fails on new data.
Graphical Idea
5. Conclusion
Underfitting occurs when a model is too simple, while overfitting occurs when a model is too complex
and memorizes the training data. The Bias–Variance Trade-off helps in balancing these problems to
build models that generalize well to unseen data.
Achieving the right balance between bias and variance is essential for building accurate and reliable
deep learning models.
1. Introduction
In deep learning, a loss function is used to measure how well a model’s predictions match the actual
target values. It calculates the error between predicted output and actual output.
During training, the neural network tries to minimize the loss function by adjusting the weights using
optimization algorithms such as Gradient Descent.
The smaller the loss value, the better the model performance.
A loss function is a mathematical function that calculates the difference between the predicted value
and the true value of a model.
It helps the neural network understand how wrong its prediction is.
General idea:
Example:
• Temperature prediction
MSE calculates the average of the squared difference between predicted and actual values.
Formula:
MSE=1n∑i=1n(yi−y^i)2MSE=n1i=1∑n(yi−y^i)2
Where
• nn = number of samples
Example
Error = 10
MSE will penalize this difference by squaring the error.
5. Loss Functions for Classification
Example:
• Spam detection
• Disease classification
• Image classification
Example:
Email classification
• Spam
• Not Spam
The function calculates the difference between predicted probability and actual class label.
Characteristics:
Categorical Cross-Entropy
Example:
Image classification
• Cat
• Dog
• Bird
It measures how far predicted probabilities are from the actual class label.
7. Loss Functions for Reconstruction
Reconstruction loss is used in models where the network tries to reconstruct the original input.
Example models:
• Autoencoders
These models try to reproduce the input data at the output layer.
• Binary Cross-Entropy
Loss functions play an important role in training neural networks because they:
9. Summary
10. Conclusion
Loss functions are essential in deep learning because they measure the difference between predicted
and actual outputs. During training, neural networks try to minimize the loss value using optimization
algorithms. Choosing the correct loss function is important for improving the performance and accuracy
of deep learning models.
1. Introduction
In deep learning, classification problems involve predicting categorical outputs such as class labels.
Examples:
• Disease or No Disease
To train the model, we need a loss function that measures the difference between the predicted class
probabilities and the actual class labels. These are called classification loss functions.
Definition
Binary Cross-Entropy Loss (Log Loss) is used when the classification problem has two classes (binary
classification).
Example:
• True / False
• Yes / No
Formula
L=−[ylog(p)+(1−y)log(1−p)]L=−[ylog(p)+(1−y)log(1−p)]
Where:
• yy = actual label (0 or 1)
• pp = predicted probability
Example
1 (Spam) 0.9
Since the prediction is close to the actual value, the loss will be small.
Characteristics
Definition
Example:
• Cat
• Dog
• Bird
• Horse
The model outputs probabilities for each class using the Softmax activation function.
Formula
L=−∑yilog(pi)L=−∑yilog(pi)
Where:
Example
Class Probability
Cat 0.70
Dog 0.20
Bird 0.10
If the actual class is Cat, the loss will be small because 0.70 is high.
Characteristics
4. Hinge Loss
Definition
Hinge Loss is mainly used in Support Vector Machines (SVM) and classification tasks.
Formula
L=max(0,1−y⋅f(x))L=max(0,1−y⋅f(x))
Where:
Characteristics
5. Summary Table
6. Conclusion
Loss functions for classification measure how well a model predicts the correct class labels. Common
classification loss functions include Binary Cross-Entropy, Categorical Cross-Entropy, and Hinge Loss.
These functions guide the neural network during training to reduce prediction errors and improve
accuracy.
1. Introduction
In deep learning, reconstruction tasks involve rebuilding the original input data from its internal
representation.
Loss functions for reconstruction measure how close the reconstructed output is to the original input.
These loss functions are commonly used in models like:
• Autoencoders
The goal is to minimize the difference between the input and reconstructed output.
A reconstruction loss function measures the difference between the original input and the
reconstructed output produced by the neural network.
If the reconstructed output is very similar to the input, the loss value will be small.
Example idea:
• Original Image
• Reconstructed Image
Definition
Mean Squared Error (MSE) is the most commonly used reconstruction loss.
It calculates the average squared difference between the original input and reconstructed output.
Formula
MSE=1n∑i=1n(xi−x^i)2MSE=n1i=1∑n(xi−x^i)2
Where:
• nn = number of samples
Example
MSE calculates the square of the difference, which penalizes larger errors more strongly.
Advantages
• Simple to compute
Definition
Mean Absolute Error (MAE) measures the average absolute difference between the input and
reconstructed output.
Formula
MAE=1n∑i=1n∣xi−x^i∣MAE=n1i=1∑n∣xi−x^i∣
Where:
Characteristics
Example
Definition
Binary Cross-Entropy (BCE) is used when the input data values are between 0 and 1, such as binary
images.
It measures the difference between original binary data and reconstructed output probabilities.
Example
Used in:
Reconstruction loss functions are used in many deep learning applications such as:
• Autoencoders
• Image denoising
• Image compression
• Feature learning
• Anomaly detection
Example:
An autoencoder learns to reconstruct handwritten digits from compressed representations.
7. Summary Table
8. Conclusion
Loss functions for reconstruction measure how accurately a neural network recreates the original input
data. Common reconstruction losses include Mean Squared Error, Mean Absolute Error, and Binary
Cross-Entropy. These loss functions are widely used in autoencoders and image reconstruction tasks to
ensure the reconstructed output closely matches the original input.
1. Introduction
In deep learning, optimization algorithms are used to minimize the loss function by updating the
weights and biases of the neural network during training.
These algorithms help the model learn from data efficiently and improve prediction accuracy.
Optimization algorithms mainly work with gradient descent to find the best set of parameters that
reduces error.
These algorithms improve training speed and help neural networks converge to an optimal solution.
SGD updates the weights using one training sample at a time instead of the entire dataset.
Characteristics
• Faster updates
AdaGrad adapts the learning rate for each parameter during training.
Characteristics
Advantages
Limitation
Learning rate may become very small over time, slowing training.
RMSProp is an improved version of AdaGrad that solves the problem of decreasing learning rate.
Characteristics
Applications
• Momentum
• RMSProp
Characteristics
Applications
Used in:
• Image recognition
7. Summary Table
8. Conclusion
Optimization algorithms play a crucial role in training deep learning models by minimizing the loss
function and updating model parameters efficiently. Common optimization algorithms such as SGD,
AdaGrad, RMSProp, and Adam help neural networks learn faster and achieve better accuracy. Among
these, Adam is widely used because of its efficiency and adaptive learning capability.
1. Introduction
A perceptron is the simplest type of artificial neural network used for binary classification problems. It
works like a single artificial neuron that receives inputs, applies weights, and produces an output.
However, a single perceptron can solve only simple linear problems. To solve complex problems, we
use Multi-Layer Perceptron (MLP) which contains multiple layers of neurons.
2. Perceptron
Definition
• Input values
• Weights
• Bias
• Activation function
The perceptron calculates a weighted sum of inputs and passes it through an activation function to
produce the output.
Structure of Perceptron
Components:
y=f(w1x1+w2x2+...+wnxn+b)y=f(w1x1+w2x2+...+wnxn+b)
Where:
• xx = input values
• ww = weights
• bb = bias
• ff = activation function
Example of Perceptron
• AND gate
• OR gate
• NOT gate
0 0 0
0 1 0
1 0 0
1 1 1
Limitations of Perceptron
Definition
A Multi-Layer Perceptron (MLP) is an advanced neural network that contains multiple layers of
neurons including hidden layers.
Layers in MLP:
1. Input Layer
3. Output Layer
Working of MLP
2. Data passes through hidden layers where neurons apply weights and activation functions.
Advantages of MLP
Applications
• Image recognition
• Speech recognition
• Medical diagnosis
• Pattern recognition
5. Conclusion
A Perceptron is the basic unit of a neural network used for simple classification tasks. However, it is
limited to linear problems. A Multi-Layer Perceptron (MLP) extends this concept by adding hidden
layers, enabling the network to learn complex patterns and solve non-linear problems effectively.
✅ If your Unit-2 questions continue, the last very common 10-mark PYQ is:
I can also give you a very short exam revision version (5–6 lines per concept) that is easy to memorize
for Insem.
1. Introduction
A Multilayer Feed-Forward Neural Network (MLFFN) is a type of artificial neural network that
contains multiple layers of neurons where information flows in one direction only—from the input
layer to the output layer.
It is called feed-forward because the data moves forward through the network without looping back.
This network is commonly used in deep learning and machine learning for solving complex problems
such as classification and prediction.
1. Input Layer
2. Hidden Layer(s)
3. Output Layer
Simple diagram:
Each neuron in one layer is connected to every neuron in the next layer.
3. Components of MLFFN
1. Input Layer
Example:
For predicting house price, inputs may include:
• house size
• number of rooms
• location
2. Hidden Layers
Each neuron:
• adds bias
Mathematical expression:
z=w1x1+w2x2+...+wnxn+bz=w1x1+w2x2+...+wnxn+b
After this calculation, an activation function like ReLU, Sigmoid, or Tanh is applied.
Hidden layers help the network learn complex patterns from data.
3. Output Layer
Examples:
Data moves through hidden layers where neurons perform weighted calculations.
The error between predicted and actual output is calculated and weights are updated.
5. Characteristics of MLFFN
6. Applications of MLFFN
• Image recognition
• Speech recognition
• Medical diagnosis
• Pattern recognition
• Financial prediction
7. Advantages
8. Limitations
• Risk of overfitting
9. Conclusion
A Multilayer Feed-Forward Neural Network is a powerful neural network architecture consisting
of input, hidden, and output layers where information flows only in the forward direction. By using
multiple hidden layers and activation functions, MLFFNs can learn complex patterns and are widely used
in modern deep learning applications.
1. Introduction
An activation function determines the output of a neuron in a neural network. It introduces non-
linearity, which allows the network to learn complex patterns from data.
Selecting the correct activation function is important because it affects training speed, model accuracy,
and gradient flow in deep learning models.
1. Type of Problem
Regression Linear
Example:
If the task is email spam detection, the Sigmoid function is used.
Example:
Activation functions like Sigmoid and Tanh may cause the vanishing gradient problem in deep
networks.
Example:
Deep CNN models commonly use ReLU activation.
4. Computational Efficiency
Example:
Sigmoid 0 to 1
Tanh -1 to 1
Activation Output Range
ReLU 0 to ∞
Sigmoid formula:
f(x)=11+e−xf(x)=1+e−x1
-10-8-6-4-2246810-0.4-[Link].60.81
Classes:
• Cat
• Dog
• Bird
4. Summary Table
5. Conclusion
Selecting an appropriate activation function depends on the type of problem, network architecture,
gradient behavior, and output requirements. In modern deep learning models, ReLU is commonly used
in hidden layers, while Sigmoid and Softmax are used in output layers depending on the classification
task. Proper selection of activation functions improves the performance and efficiency of neural
networks.
In a neural network, each neuron calculates a weighted sum of inputs. If we do not apply an activation
function, the output will remain linear.
Activation functions introduce non-linearity into the neural network, enabling it to learn complex
patterns and relationships in data.
Thus, activation functions are essential for making neural networks powerful and capable of solving
real-world problems.
Where:
• xx = input values
• ww = weights
• bb = bias
If no activation function is applied, the output is simply linear, meaning the entire neural network
behaves like a single linear model.
1. Introduces Non-Linearity
Activation functions allow neural networks to learn non-linear relationships between inputs and
outputs.
Example:
• Image recognition
• Speech recognition
Without activation functions, neural networks could only solve linear problems.
Example:
In image recognition:
Examples:
Sigmoid 0 to 1
Tanh -1 to 1
ReLU 0 to ∞
Without activation functions, multiple layers would collapse into a single linear transformation, making
deep learning useless.
• model accuracy
• learning capability
5. Example
f(x)=11+e−xf(x)=1+e−x1
-10-8-6-4-2246810-0.4-[Link].60.81
6. Conclusion
Activation functions are essential in neural networks because they introduce non-linearity, control
output values, and enable the network to learn complex patterns. Without activation functions, neural
networks would behave like simple linear models and would not be able to solve complex deep learning
problems.
✅ If you want, I can also give you one-page quick revision notes for Unit-1 and Unit-2 (all important
answers for your Insem) so you can revise 15–16 marks worth of answers in 10 minutes before the
exam.
1. Introduction
Training a neural network means teaching the network to learn patterns from data so that it can make
accurate predictions.
During training, the neural network adjusts its weights and biases to reduce the error between
the predicted output and the actual output.
1. Forward Propagation
2. Loss Calculation
At the beginning, the neural network assigns random values to weights and biases.
Example:
w1 = 0.3
w2 = 0.6
b = 0.1
The training data (features) are fed into the input layer of the neural network.
Example:
For house price prediction
• Size of house
• Number of rooms
• Location
Step 3: Forward Propagation
In forward propagation, the input data passes through the network from the input layer → hidden layer
→ output layer.
z=w1x1+w2x2+...+wnxn+bz=w1x1+w2x2+...+wnxn+b
Example:
• ReLU
• Sigmoid
• Tanh
The predicted output is compared with the actual output using a loss function.
Example:
1 0.7
Step 5: Backpropagation
The error is propagated backward through the network and gradients are calculated.
• Gradient Descent
• Adam
• RMSProp
wnew=wold−η∂L∂wwnew=wold−η∂w∂L
Where:
• ηη = learning rate
• LL = loss function
The entire process is repeated for many iterations (epochs) until the model achieves low error and
good accuracy.
Input Data
↓
Forward Propagation
↓
Predicted Output
↓
Loss Calculation
↓
Backpropagation
↓
Update Weights
↓
Repeat until error is minimized
4. Example
Input features:
• sender reputation
• email length
Training process:
2. Loss is calculated.
5. Conclusion
A neural network is trained by repeatedly passing input data through the network, calculating the
error, and updating weights using backpropagation and optimization algorithms. This iterative process
helps the model learn patterns from data and make accurate predictions.
✅ If you want, I can also give you the 12 most important answers from your syllabus that usually
come in Insem exams, so you can revise almost the entire unit quickly.
yes give
Good Since your Insem covers Unit-1 and Unit-2, here are the 12 most important questions that
usually appear in Deep Learning exams. If you revise these, you will cover almost the full syllabus.
Key topics:
• Input layer
• Hidden layers
• Output layer
• Forward propagation
Important points:
• Image recognition
• Speech recognition
• Self-driving cars
• Healthcare diagnosis
• Recommendation systems
Possible question:
• Define hyperparameters
Important hyperparameters:
• Learning Rate
• Regularization
• Momentum
• Sparsity
• Hidden Units
Key points:
• Forward propagation
• Loss calculation
• Backpropagation
• Weight update
Common algorithms:
• SGD
• AdaGrad
• RMSProp
• Adam
Must include:
• Definition
• Causes
• Effects
• Solutions
Include:
• Definition
• Structure
• Equation
Important points:
• Input layer
• Hidden layer
• Output layer
• Backpropagation
Include:
• Architecture
• Working
• Applications
Important ones:
• Linear
• Sigmoid
• Tanh
• ReLU
• Softmax
Possible question:
Explain any five activation functions
Three types:
• Loss functions for Regression
2⃣ Backpropagation Flow