0% found this document useful (0 votes)
11 views21 pages

Deep Learning Overview: Frameworks & Applications

The document provides a comprehensive overview of deep learning, covering its definition, applications, and key frameworks like TensorFlow and PyTorch. It explains fundamental concepts such as neural networks, activation functions, and the significance of forward and backward propagation. Additionally, it discusses advanced topics like transfer learning, vector databases, and the role of stable diffusion in generative AI.

Uploaded by

ck123.kk.123
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views21 pages

Deep Learning Overview: Frameworks & Applications

The document provides a comprehensive overview of deep learning, covering its definition, applications, and key frameworks like TensorFlow and PyTorch. It explains fundamental concepts such as neural networks, activation functions, and the significance of forward and backward propagation. Additionally, it discusses advanced topics like transfer learning, vector databases, and the role of stable diffusion in generative AI.

Uploaded by

ck123.kk.123
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DeepLear

ning
I
NTERVI
EW Q&A
QUESTION & ANSWERS

Deep Learning with TensorFlow & PyTorch,


CNNs, GANs and Stable Diffusion

1. What do you understand about Deep Learning?


Deep learning is a type of artificial intelligence that teaches computers to
learn from large amounts of data. It uses neural networks, which are
inspired by how the human brain works, to recognize patterns and make
decisions. For example, deep learning can help computers understand
images, translate languages, or even play games by analysing data and
improving their performance over time.

Key point/usage of Deep Learning:

1. Neural Networks: Utilizes multi-layered neural networks to


process and analyze data.
2. Data-Driven: Requires large datasets to train models effectively
and accurately.
3. Feature Learning: Automatically identifies relevant features in
data without manual feature engineering.
4. Applications: Commonly used in image recognition, natural
language processing, and speech recognition.
5. Performance: Often outperforms traditional machine learning
methods on complex tasks.

1
QUESTION & ANSWERS

2. What are the applications of Deep Learning?


List of Key applications of deep learning is given below:

1. Image Recognition: Used in facial recognition, object detection,


and medical imaging analysis.
2. Natural Language Processing: Powers chatbots, language
translation, sentiment analysis, and text summarization.
3. Speech Recognition: Enables voice-activated assistants,
transcription services, and voice-to-text applications.
4. Autonomous Vehicles: Supports self-driving technology by
processing sensor data for navigation and obstacle detection.
5. Recommendation Systems: Enhances user experiences on
platforms like Netflix and Amazon by suggesting personalized
content.
6. Generative Models: Creates new content, such as art, music, and
realistic images (e.g., GANs).

3. List down the major frameworks you are familiar with in


deep learning ?
The deep learning frameworks and tools are:

1. Keras

2. TensorFlow

3. PyTorch

4. Theano

5. CNTK

6. Caffe2

7. MXNet

2
QUESTION & ANSWERS

4. What do you mean by neuron ?


A neuron is a computational unit in a neural network that processes input
data, applies a mathematical function, and produces an output signal.

5. Mention the type of data structures we use for deep


learning.
The data structures used in deep learning are:

1. Lists

2. Dictionaries

3. DataFrames

4. Matrices

5. Tensors

6. Computation Graphs

6. Mention usage applications of perceptron ?


Important Applications of the perceptron are listed below:

3
QUESTION & ANSWERS

1. Binary Classification: Used for tasks like spam detection or


sentiment analysis.
2. Pattern Recognition: Identifies patterns in images, handwriting, or
speech.
3. Image Segmentation: Assists in distinguishing objects within an
image for analysis.
4. Medical Diagnosis: Helps classify diseases based on patient data
and symptoms.
5. Financial Predictions: Used in stock market predictions and
credit scoring.
6. Text Classification: Assists in categorizing documents or
messages based on content.

7. List down a few supervised learning and unsupervised


learning algorithms available under the umbrella of Deep
Learning.
The supervised learning algorithms are:

1. Artificial Neural Network (ANN)

2. Perceptron (single and multi-layer)

3. Convolution Neural Network (CNN)

4. Recurrent Neural Network (RNN)

The unsupervised learning algorithms are:

1. Autoencoders

2. Self-Organizing Maps (SOMs)

3. Boltzmann Machine

4
QUESTION & ANSWERS

4. Generative adversarial networks (GANs)

8. Define Neural Networks.


Neural networks are computational models inspired by the human brain,
consisting of interconnected nodes (neurons) that process data, learn
patterns, and make decisions for tasks like classification and regression.

Major types of neural networks are given below:

1. Feedforward Neural Networks (FNNs): The simplest type, where


data flows in one direction from input to output layers, without
cycles.
2. Convolutional Neural Networks (CNNs): Primarily used for
image processing, they use convolutional layers to automatically
detect and learn spatial hierarchies in data.
3. Recurrent Neural Networks (RNNs): Designed for sequential
data, they have connections that loop back, allowing them to
maintain a memory of previous inputs.
4. Long Short-Term Memory Networks (LSTMs): A type of RNN
that can remember information for longer periods, making them
effective for tasks like language modelling and time series
prediction.
5. Generative Adversarial Networks (GANs): Comprises two
networks, a generator and a discriminator, that compete against
each other to generate realistic data samples.

5
QUESTION & ANSWERS

6. Autoencoders: Unsupervised networks that learn to encode input


data into a compressed representation and then decode it back,
commonly used for dimensionality reduction and anomaly
detection.
7. Radial Basis Function Networks (RBFNs): Utilize radial basis
functions as activation functions, often used for function
approximation and classification tasks.
8. Transformer Networks: Focused on sequence-to-sequence
tasks, they use self-attention mechanisms and are highly effective
in natural language processing applications.

9. Explain how a neural network works.


There are three steps to perform in any neural network:
1. First, take the input variables and estimate the output or the
predicted Y values.
2. Next, calculate the loss or the error term, and lastly
3. Minimize the loss function or the error term by using the backward
propagation, i.e., the loss value is taken backwardly one by one at
each layer to update the weights so that the error term is
minimized.

10. What is the significance of forward propagation and


backward propagation in neural networks ?

The significance of forward propagation and backward propagation in


neural networks can be stated as follows:

Forward Propagation

1. Prediction Generation: It calculates the output of the neural


network based on the input data, allowing the model to make
predictions.

6
QUESTION & ANSWERS

2. Layer Processing: Each layer processes its input data through


activation functions, enabling the network to learn complex
patterns and relationships.
3. Data Flow: It facilitates the flow of data through the network,
maintaining the connections and weights that influence the
predictions.
4. Activation Calculation: Determines the activation values for
neurons, which are crucial for subsequent error calculation and
learning.

Backward Propagation

1. Error Calculation: It computes the gradient of the loss function


with respect to each weight in the network, identifying how much
each weight contributed to the error.
2. Weight Adjustment: Utilizes the gradients to update the weights
in the direction that reduces the loss, effectively training the
network.
3. Learning Optimization: Enables the network to learn from errors,
refining its parameters to improve accuracy and performance over
time.
4. Propagation of Errors: Distributes the error backward through the
layers, allowing earlier layers to learn from mistakes made in later
layers.

7
QUESTION & ANSWERS

11. What is an activation function, & why do we use them?


An activation function in a neural network decides whether a neuron
should be activated or not. Think of it as a gatekeeper that processes
input and decides the output. This function adds non-linearity to the
model, enabling it to learn complex patterns.

Common Activation Functions:

1. Sigmoid: Smoothly squashes the output between 0 and 1.


2. ReLU (Rectified Linear Unit): Outputs the input directly if positive,
else outputs zero.
3. Tanh (Hyperbolic Tangent): Similar to sigmoid but squashes
output between -1 and 1.
4. Softmax: Turns logits into probabilities, used in the output layer for
classification tasks.

12. Differentiate between CNN and RNN in the context of


Neural Networks ?

Feature CNN (Convolutional Neural RNN (Recurrent Neural Network)


Network)

Structure Convolutional layers, pooling layers Recurrent layers with loops

8
QUESTION & ANSWERS

Specialty Image and spatial data processing Sequential and temporal data

Operation Applies filters to local receptive Maintains memory of previous inputs


fields

Use Case Image classification, object Language modelling, time-series


detection forecasting

Memory No inherent memory of previous Remembers previous inputs through


inputs loops

Data Type Best for 2D data (e.g., images) Best for 1D data (e.g., text,
sequences)

Example Facial recognition Speech recognition

13. What is transfer learning ?


Transfer learning is a technique where a pre-trained model is adapted
for a different but related task, enabling efficient learning with less data
and reduced training time while improving performance.

9
QUESTION & ANSWERS

The most common types of transfer learning are given below:-

1. Domain Adaptation: Adapting a model trained on one domain to


work effectively in a different but related domain.
2. Fine-Tuning: Taking a pre-trained model and making slight
adjustments to its weights on a new task, often using a smaller
dataset.
3. Feature Extraction: Using the pre-trained model to extract
relevant features from data, which are then fed into a simpler
model for the new task.
4. Multi-task Learning: Training a model on multiple related tasks
simultaneously, allowing shared knowledge and representations to
benefit all tasks.

14. Mention a few advantages of transfer learning.


Advantages of Transfer Learning: -
1. Reduced Training Time: Significantly less time is needed to train
models since they start with pre-learned features.
2. Lower Data Requirements: Requires fewer labelled data for the
target task, making it feasible in data-scarce scenarios.
3. Performance Improvements: Often leads to better accuracy as
the model leverages knowledge from related tasks.
4. Generalisation: Enhances the model's ability to generalise by
incorporating learned representations from diverse datasets.
5. Faster Deployment: Accelerates the development cycle, enabling
quicker deployment of effective models in real-world applications.

15. How do Vector Databases bolster semantic search


within Generative AI applications?
Vector Databases play a pivotal role in semantic search by storing data
point embeddings in a high-dimensional space. This enables efficient

10
QUESTION & ANSWERS

similarity searches, crucial for tasks such as information retrieval and


recommendation systems in Generative AI applications.

16. What do you understand about Stable Diffusion within


Generative AI models?
Stable Diffusion is a method employed by generative models to refine
noisy inputs iteratively, thereby generating high-quality samples.
Through a diffusion process, this technique ensures the production of
realistic outputs, enhancing the overall fidelity of Generative AI models.

17. Mention the significance of fine-tuning Large Language


Models (LLMs) in Generative AI applications.
Fine-tuning LLMs involves adapting pretrained models to specific tasks
or domains by further training them on task-specific data.

This practice significantly enhances model performance on targeted


tasks without necessitating extensive training from scratch, thereby
optimising Generative AI applications.

11
QUESTION & ANSWERS

18. What do you know about PyTorch ?


PyTorch is an open-source machine learning framework developed by
Facebook, designed for building and training deep learning models. It
features dynamic computation, automatic differentiation, and an intuitive
interface, making it ideal for research and experimentation.

Advantages of PyTorch, each in nine words:


1. Dynamic Computation Graphs: Allows flexible model building
and easier debugging processes.
2. Easy to Learn: Intuitive syntax and structure make it user-friendly.
3. Strong Community Support: Active community provides
extensive resources and documentation.
4. Efficient GPU Utilization: Optimizes performance on GPUs for
faster computations.
5. Seamless Integration: Works well with Python libraries like
NumPy and SciPy.

19. How are the key modules in PyTorch ?


Herein the key modules of PyTorch are listed below: -
1. Autograd: The autograd module is PyTorch’s automatic
differentiation engine that helps to compute the gradients in the
forward pass in quick time. Autograd generates a directed acyclic
graph where the leaves are the input tensors while the roots are
the output tensors.
2. Optim: The Optim module is a package with pre-written algorithms
for optimizers that can be used to build neural networks.

12
QUESTION & ANSWERS

3. nn : The nn module includes various classes that help to build


neural network models. All modules in PyTorch subclass the nn
module.

20. Mention a few key methods to reshape tensor in


PyTorch.
There are multiple methods to reshape tensor dimensions in
PyTorch, some of which are:
1. [Link](input, shape): Reshapes input to shape (if
compatible).
2. [Link](shape): Returns a view of the original tensor in
a different shape but shares the same data as the original tensor.
3. [Link](input, dims): Returns a view of the original input
with its dimensions rearranged to dims.

21. What is the difference between forward() and


backward() methods in PyTorch.

● In PyTorch, the forward() method is used to compute the forward


pass of the neural network model which defines how your model is
going to be run, from input to output.

● The backward function computes the gradient of the current


Tensors with respect to some scalar value. In the neural network
model context, backward() computes the gradients of the model's
parameters with respect to a given loss function.

13
QUESTION & ANSWERS

NOTE: the forward() method specifies how the model runs, while the
backward() method calculates gradients that are used to optimize the
model's parameters.

22. What is tensorflow ?


TensorFlow is an open-source tool by Google for building and training
machine learning models. It helps create smart applications for tasks like
image recognition and natural language processing efficiently.

Advantages of using tensorflow:

1. Flexibility: Supports diverse machine learning models and


architectures for customizable solution development.

2. Scalability: Efficiently manages large datasets and complex


computations across multiple CPUs and GPUs.

14
QUESTION & ANSWERS

3. Ecosystem: Offers extensive libraries and tools for various


machine learning use cases and applications.

4. Community Support: Large community providing documentation,


tutorials, and forums for effective troubleshooting.

5. Performance: Optimised for speed and efficiency, enabling fast


training and inference processes.

6. Cross-Platform: Functions seamlessly across desktop, mobile,


and cloud environments for accessibility.

7. Integration: Easily connects with other tools and languages for


diverse application needs.

23. What is the difference between PyTorch &TensorFlow ?

Feature PyTorch TensorFlow

Developer Facebook’s AI Google


Research lab (FAIR)

Graph Dynamic (define & run Static (define before running)


Execution on-the-fly)

Ease of Use More intuitive, Less intuitive (pre-TensorFlow 2.0)


beginner-friendly

Flexibility Highly flexible for Less flexible before TensorFlow


research 2.0

Production- Good, but less focus Highly robust & scalable for
Ready on production production

Ecosystem Growing, strong in Extensive with tools like


academia TensorFlow Lite and
[Link]

15
QUESTION & ANSWERS

Community Strong support in Strong support, especially for


research & prototyping production environments

24. What are the different types of tensors in Tensorflow ?


In TensorFlow, tensors can be categorised based on their dimensions
and types as listed below:
1. Scalar (0-D Tensor): A single numerical value (e.g., a float or
integer).
Example: 5 or 3.14.
2. Vector (1-D Tensor): A one-dimensional array of numbers.
Example: [1, 2, 3].
3. Matrix (2-D Tensor): A two-dimensional array of numbers,
organised in rows and columns. Example: [[1, 2], [3, 4]].
4. 3-D Tensor: A three-dimensional array, often used for representing
data such as images (height, width, channels). Example: [[[1, 2],
[3, 4]], [[5, 6], [7, 8]]].
5. n-D Tensor: A tensor with three or more dimensions, used for
complex data structures like videos or multi-dimensional datasets.
Example: a 4-D tensor might represent a batch of images.
6. Sparse Tensor: Represents tensors with a lot of zero values
efficiently, storing only non-zero elements.
7. String Tensor: A tensor that contains string data, useful for text
processing tasks.

25. Define the term tensorboard.


TensorBoard serves as a valuable tool in the machine learning workflow,
offering essential measurements and visualisations.

16
QUESTION & ANSWERS

It facilitates the tracking of experiment metrics, such as loss and


accuracy, visualising the model graph, projecting embeddings to a
lower-dimensional space, and providing various other functionalities.

26. What are the use cases of TensorFlow?


There are many use case applications of tensorflow, a few of them are
listed below:
1. Text-Based Applications
2. Time Series Algorithms
3. Image Recognition
4. Video Detection
5. Voice Recognition Applications
27. Mention a few companies, which use tensorflow.
Tensorflow is majorly adopted among all the different industries,
Although some firms like Google contributed majorly in development of
TensorFlow. Here is the list of companies with the purpose of using
TensorFlow.

1. Google – Developed TensorFlow and uses it extensively for


search, translation, and image analysis across products.

17
QUESTION & ANSWERS

2. Uber – Enhances route optimization, arrival predictions, and data


analysis for a better ride-sharing experience.

3. Airbnb – Improves host-guest matching, pricing models, and


reviews with machine learning for optimal user satisfaction.

4. Dropbox – Uses TensorFlow for document scanning, image


recognition, and data categorization to streamline file organisation.

5. eBay – Enhances search, recommendations, and customer


service through TensorFlow’s machine-learning models.

6. Intel – Leverages TensorFlow to optimise chip performance, AI


processing, and power efficiency in real-time applications.

28. What are Tensorflow abstractions?

The major TensorFlow abstractions are listed below:

1. Tensors – Core data structures representing multidimensional


arrays for numerical computation.
2. Graphs – Define computations as directed acyclic graphs,
outlining the flow of operations.
3. Sessions – Execute the defined graphs, managing resources and
tensor operations.
4. Layers – Simplify neural network creation with reusable layers
(e.g., Dense, Convolutional).
5. Estimators – Pre-built, high-level models that streamline common
machine learning tasks (e.g., classification, regression).

29. What is TensorFlow Lite?


TensorFlow Lite is a streamlined lightweight version of TensorFlow for
mobile and IoT devices, optimizing models for efficient, low-latency
on-device inference, enabling applications like image recognition and
natural language processing with minimal resources.

18
QUESTION & ANSWERS

There are a few key benefits of TensorFlow Lite:


1. Low Latency – Enables real-time inference by processing data
on-device.
2. Optimized Size – Reduces model size, conserving storage and
memory resources.
3. Energy Efficiency – Minimizes power consumption, ideal for
mobile and embedded devices.
4. Cross-Platform – Runs on Android, iOS, and various IoT
operating systems.
5. Hardware Acceleration – Supports GPUs, TPUs, and specialised
accelerators for faster performance.

30. What is TensorFlow optimizer?


A TensorFlow optimizer is a function or algorithm used to adjust the
weights of a neural network to minimise the loss function during training.
Optimizers are key for improving a model's accuracy by iteratively
adjusting parameters, helping the model converge on the optimal
solution.

Tensorflow Optimizers:
TensorFlow provides various optimizers, such as SGD (Stochastic
Gradient Descent), Adam, and RMSprop, each with unique techniques
for updating weights efficiently.

19
www.
aimer
[Link]

THANK YOU

Vi
shwaMohan Vi
shwa.
mohan.
singh Vi
shwaMohan Vi
shwaMohan

You might also like