๐ AI Interview Questions with Answers โ Part 6
51. What is Deep Learning and how is it different from Machine Learning?
Deep Learning is a subset of Machine Learning that uses neural networks with many layers to learn complex patterns from data.
Machine Learning vs Deep Learning
Machine Learning
- Requires manual feature engineering
- Works well on smaller datasets
- Simpler models
- Faster training
Deep Learning
- Learns features automatically
- Needs large datasets
- Uses deep neural networks
- More computationally expensive
Applications of Deep Learning
- Image recognition
- Speech recognition
- Self-driving cars
- NLP and chatbots
๐ Example: Face recognition systems in smartphones use Deep Learning.
52. What is a Neural Network?
A Neural Network is a computing system inspired by the human brain.
It consists of interconnected nodes called neurons.
Main Layers
1. Input Layer
2. Hidden Layers
3. Output Layer
How It Works
- Receives input
- Processes information
- Produces output
๐ Example: A neural network can identify whether an image contains a cat or dog.
53. Can you explain how a perceptron works?
A perceptron is the simplest type of artificial neuron used for binary classification.
It:
- Takes inputs
- Applies weights
- Calculates output
Perceptron Formula
y = f(โ w_ix_i + b)
Where:
x_i = input
w_i = weight
b = bias
f = activation function
Use Case
Used for simple yes/no predictions.
54. What are activation functions and why are they needed?
Activation functions decide whether a neuron should activate or not.
They introduce non-linearity into neural networks.
Why They Are Important
Without activation functions:
- Neural networks behave like simple linear models
- Cannot learn complex patterns
Common Activation Functions
- Sigmoid
- ReLU
- Tanh
- Softmax
๐ Example: Used in image and speech recognition systems.
55. Why is ReLU widely used in Deep Learning?
ReLU stands for Rectified Linear Unit.
f(x)=max(0,x)
Why ReLU Is Popular
- Computationally efficient
- Reduces vanishing gradient problem
- Faster training
- Works well in deep networks
Behavior
- Negative values โ 0
- Positive values โ unchanged
Applications
Used in most modern Deep Learning models.
56. What is backpropagation in neural networks?
Backpropagation is the process of updating neural network weights by calculating errors and propagating them backward.
How It Works
1. Forward pass
2. Calculate error
3. Propagate error backward
4. Update weights
Goal
Reduce prediction error.
Importance
Backpropagation helps neural networks learn efficiently.
๐ Example: Used while training image classification models.
57. How does gradient descent optimize a model?
Gradient Descent is an optimization algorithm used to minimize the loss function.
How It Works
- Calculates gradients
- Moves weights toward lower error
- Repeats until minimum loss is achieved
Update Formula
w = w - ฮท(dL)/(dw)
Where:
w = weight
ฮท = learning rate
L = loss function
Goal
Find optimal parameters for better predictions.
58. What is the vanishing gradient problem?
The vanishing gradient problem occurs when gradients become extremely small during backpropagation.
As a result:
- Early layers learn very slowly
- Deep networks become difficult to train
Common Causes
- Deep neural networks
- Sigmoid or tanh activations
Solutions
- ReLU activation
- Batch normalization
- Residual networks (ResNet)
๐ Example: Training very deep CNNs without ReLU may fail due to vanishing gradients.
59. What is dropout in Deep Learning?
Dropout is a regularization technique used to prevent overfitting.
How It Works
Randomly disables some neurons during training.
Benefits
- Prevents memorization
- Improves generalization
- Reduces overfitting
Example
If dropout rate = 0.5:
50% neurons are temporarily ignored during training.
This forces the network to learn robust patterns.
Post #2186
953
- โค 2