Q.1) Define DL, explain how its differ from traditional ML.
Deep learning is branch of Artificial intelligent where
computer learns from data and using many layers of neural
network
Example: Self-driving cars use DL to recognize traffic signs
and pedestrians.
Difference between Deep Learning and Traditional Machine
Learning:
Feature
Traditional ML
Works well with
Data
small to medium
requirement
data
Feature
extraction
Manual feature
extraction by
humans
Deep Learning
Requires large datasets
Automatic feature
extraction
Needs high
Less computational
Computation
computational power
power
(GPU/TPU)
Performs well on
Performance
simple tasks
Performs better on
complex tasks like image
recognition, NLP
Feature
Example
Traditional ML
Deep Learning
Predicting house
prices using linear
regression
Classifying cats vs dogs
using CNN
(Convolutional Neural
Network)
Q.2) Explain. the role of activation function in a neural
network write there functions there examples with there
formula.
Role of Activation Function in a Neural Network
Definition:
An activation function decides whether a neuron should be
“activated” or not. It adds non-linearity to the neural
network so it can learn complex patterns. Without activation
functions, the network would behave like a simple linear
model, no matter how many layers it has.
Roles / Importance:
1. Introduces non-linear behavior so neural networks can
solve complex problems (like image recognition, speech
recognition).
2. Controls the output of a neuron between a specific
range.
3. Helps in backpropagation by providing gradients for
learning.
4. Activation Formula Range Use Case Example
Q.3) Difference between Deep Learning and Machine
Learning
Q.4) Difference between Forward Propagation and
Backward Propagation
Forward Propagation:
It is the process of passing input data through the
neural network to get the output.
Each layer of the network performs calculations using
weights, biases, and activation functions.
The output is compared with the actual target to
calculate the error (loss).
Purpose: To predict the output for given input.
Example: If input is [2, 3] and target output is 1, the
network calculates its predicted output and computes
error.
Backward Propagation:
It is the process of updating the weights and biases in
the network based on the error.
Uses the gradient of the loss function to reduce error.
Works from output layer back to input layer (hence
“backward”).
Purpose: To improve the accuracy of the network by
minimizing error.
Example: If predicted output is 0.8 but target is 1,
backward propagation adjusts weights to make the
prediction closer to 1.
Key Differences Table:
Feature
Forward
Propagation
Backward Propagation
Direction
Input → Output
Output → Input
Goal
Predict output
Reduce error by updating
weights
Process
Uses current
weights & biases
Updates weights using
gradients
Error
Calculation
Calculates loss/error
Uses loss to compute
weight adjustment
Example
Input [2,3] →
Output 0.8
Adjust weights to make
output closer to 1
Q.5) Differentiate between Adam and Gradient Descent
Gradient Descent (GD):
Gradient Descent is an optimization algorithm used to
find the minimum of a function (like minimizing loss in
ML models).
It updates the model’s parameters in the opposite
direction of the gradient.
Formula:
θ=θ−α⋅∇J(θ)\theta = \theta - \alpha \cdot \nabla
J(\theta)θ=θ−α⋅∇J(θ)
where θ = parameters, α = learning rate, J(θ) = loss function.
Types:
1. Batch GD – uses all data at once.
2. Stochastic GD – uses one sample at a time.
3. Mini-batch GD – uses small batches of data.
Limitation: Can be slow, may get stuck in local minima,
and learning rate needs careful tuning.
Adam (Adaptive Moment Estimation):
Adam is an advanced optimization algorithm that
improves Gradient Descent.
It uses momentum and adaptive learning rates for each
parameter.
How it works:
o
o
Calculates first moment (mean) and second
moment (variance) of gradients.
Updates parameters considering both past
gradients and current gradient.
Advantages:
o
Faster convergence.
o
Works well with large datasets and noisy gradients.
o
No need to manually tune learning rate as much.
Comparison Table:
Feature
Gradient Descent
Adam
Learning
Rate
Adaptive for each
Fixed for all parameters
parameter
Speed
Can be slow
Faster convergence
Memory
Low
Higher (stores
moments)
Use Case
Simple problems, small Deep learning, large
datasets
datasets
Handling
Noise
Sensitive to noisy
gradients
Handles noisy
gradients well
Example:
GD: Updating weights of a simple linear regression
model.
Adam: Training deep neural networks like CNNs for
image recognition.
Q.6) 10 Real-World Applications of Deep Learning
1. Image Recognition – Computers can identify objects,
people, or places in images.
o
Example: Facebook automatically tagging friends in
photos.
2. Speech Recognition – Converts spoken words into text.
o
Example: Google Assistant or Siri understands your
voice commands.
3. Natural Language Processing (NLP) – Helps computers
understand and generate human language.
o
Example: ChatGPT or Google Translate.
4. Self-Driving Cars – Deep learning detects roads, traffic
signs, pedestrians, and other vehicles.
o
Example: Tesla’s autopilot feature.
5. Medical Diagnosis – Helps detect diseases from X-rays,
MRI scans, or blood reports.
o
Example: AI detecting tumors in radiology images.
6. Fraud Detection – Identifies unusual transactions in
banking.
o
Example: Banks detecting credit card fraud
instantly.
7. Recommendation Systems – Suggests movies, products,
or music based on user behavior.
o
Example: Netflix recommending shows or Amazon
suggesting products.
8. Autonomous Robots – Robots use deep learning to
perform tasks without human help.
o
Example: Warehouse robots sorting packages
automatically.
9. Language Translation – Converts one language into
another using AI.
o
Example: Google Translate or Microsoft Translator.
10.
Gaming & Entertainment – AI predicts player
behavior and improves game experience.
o
Example: NPCs (non-player characters) in video
games acting intelligently.