0% found this document useful (0 votes)
61 views49 pages

Introduction To Deep Learning

The document contains a syllabus for a course on deep learning. It discusses various topics that will be covered over 15 hours including fundamentals of deep networks, defining deep learning, different deep learning problem types like ANN, CNN, RNN, GAN, NLP, building blocks of deep learning, and classification and detection algorithms using PyTorch. It also provides some extra reading materials on deep neural networks, transfer learning, and architectural principles of popular deep network models like AlexNet, VGG16, Inception and MobileNet.

Uploaded by

Luv Chawda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
61 views49 pages

Introduction To Deep Learning

The document contains a syllabus for a course on deep learning. It discusses various topics that will be covered over 15 hours including fundamentals of deep networks, defining deep learning, different deep learning problem types like ANN, CNN, RNN, GAN, NLP, building blocks of deep learning, and classification and detection algorithms using PyTorch. It also provides some extra reading materials on deep neural networks, transfer learning, and architectural principles of popular deep network models like AlexNet, VGG16, Inception and MobileNet.

Uploaded by

Luv Chawda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 49

D Y Patil Institute of MCA and Management

Knowledge Representation and Artificial Intelligence: ML, DL


(IT-34)

“Introduction to Deep Learning ”

Dr Gopal Sakarkar
MCA, PhD

Associate Professor

1
Syllabus
Unit Contents Hours
Deep Learning
4.1. Fundamentals of Deep networks and Defining Deep learning
4.2. Deep learning Problem types
4.2.1. ANN
4.2.2. CNN
4.2.3. RNN
4.2.4. GAN
IV 15
4.2.5. NLP
4.3. Building blocks of Deep learning
4.4. Classification and Detection
Algorithms should be taught using Python Library –
Pytorch
Extra Reading: DNN, Transfer Learning, Architectural Principals of Deep networks – AlexNet,
VGG 16, Inception, MobileNet 2
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
Fundamentals of Deep networks and Defining Deep learning
A Convolutional Neural Network (CNN)
• Convolutional Neural Networks are a type of ANNs that are used mainly for working on pixel data to process images or

for image recognition.

• CNNs are used in Deep Learning for generative and descriptive tasks that use machine vision and recommendation-

based systems.

• CNN generally relies on two layers, the feature map layer and the feature extraction layer.
Fundamentals of Deep networks and Defining Deep learning
A Convolutional Neural Network (CNN)
• A convolutional neural network is a specific kind of neural network with multiple layers.

• It processes data that has a grid-like arrangement and then extracts important features.

• One huge advantage of using CNNs is that you don't need to do a lot of pre-processing on images.
Fundamentals of Deep networks and Defining Deep learning
A Convolutional Neural Network (CNN)
• The convolutional neural network algorithm's main purpose is to get data into forms that are easier to process

without losing the features that are important for figuring out what the data represents.

• In mathematics, convolution is a mathematical operation on two functions that produces a third function that

expresses how the shape of one is modified by the other.

• The convolutional neural network algorithm's main purpose is to get data into forms that are easier to process

without losing the features that are important for figuring out what the data represents.

• A big difference between a CNN and a regular neural network is that CNN’s use convolutions to handle the math

behind the scenes.


Fundamentals of Deep networks and Defining Deep learning
Convolutional Neural Networks Working

• Convolutional neural networks are based on neuroscience findings.


• They are made of layers of artificial neurons called nodes.
• These nodes are functions that calculate the weighted sum of the inputs and return an activation map.
• This is the convolution part of the neural network.
• Each node in a layer is defined by its weight values. When you give a layer some data, like an image, it
takes the pixel values and picks out some of the visual features.
• When you're working with data in a CNN, each layer returns activation maps.
• These maps point out important features in the data set.
• If you gave the CNN an image, it'll point out features based on pixel values, like colours, and give you
an activation function.
Fundamentals of Deep networks and Defining Deep learning
Convolutional Neural Networks Working

• Usually with images, a CNN will initially find the edges of the picture.

• Then this slight definition of the image will get passed to the next layer.

• Then that layer will start detecting things like corners and color groups.

• Then that image definition will get passed to the next layer and the cycle continues until a prediction is

made.

• As the layers get more defined, this is called max pooling.

• It only returns the most relevant features from the layer in the activation map.

• This is what gets passed to each successive layer until you get the final layer.
Fundamentals of Deep networks and Defining Deep learning
A Convolutional Neural Network (CNN)

• The last layer of a CNN is the classification layer which determines the predicted value based on the
activation map.

• If you pass a handwriting sample to a CNN, the classification layer will tell you what letter is in the
image
Fundamentals of Deep networks and Defining Deep learning
A Convolutional Neural Network (CNN)

Different types of CNNs

• 1D CNN: With these, the CNN kernel moves in one direction. 1D CNNs are usually used on time-series data.

• 2D CNN: These kinds of CNN kernels move in two directions. You'll see these used with image labelling and

processing.

• 3D CNN: This kind of CNN has a kernel that moves in three directions. With this type of CNN, researchers use

them on 3D images like CT scans and MRIs.


Fundamentals of Deep networks and Defining Deep learning
Recurrent Neural Network (RNN)

• A recurrent neural network (RNN) is a special type of artificial neural network adapted to work for time series

data or data that involve sequences.

• Ordinary feedforward neural networks are only meant for data points that are independent of each other.

• However, if we have data in a sequence such that one data point depends upon the previous data point, we

need to modify the neural network to incorporate the dependencies between these data points.

• RNNs have the concept of “memory” that helps them store the states or information of previous inputs to

generate the next output of the sequence.


Fundamentals of Deep networks and Defining Deep learning
Recurrent Neural Network (RNN)

• RNN works on the principle of saving the output of a particular layer and feeding this back to the input in
order to predict the output of the layer.
• Below is how you can convert a Feed-Forward Neural Network into a Recurrent Neural Network
Fundamentals of Deep networks and Defining Deep learning
Recurrent Neural Network (RNN)
• The nodes in different layers of the neural network are compressed to form a single layer of recurrent neural
networks.
• A, B, and C are the parameters of the network.
Fundamentals of Deep networks and Defining Deep learning
Recurrent Neural Network (RNN)

• Here, “x” is the input layer, “h” is the hidden layer, and “y” is the output layer.

• A, B, and C are the network parameters used to improve the output of the model.

• At any given time t, the current input is a combination of input at x(t) and x(t-1).

• The output at any given time is fetched back to the network to improve on the output.
Fundamentals of Deep networks and Defining Deep learning
Why Recurrent Neural Network (RNN)?

RNN were created because there were a few issues in the feed-forward neural network:

•Cannot handle sequential data

•Considers only the current input

•Cannot memorize previous inputs

The solution to these issues is the RNN. An RNN can handle sequential data, accepting the current input

data, and previously received inputs. RNNs can memorize previous inputs due to their internal memory.
Fundamentals of Deep networks and Defining Deep learning
Working of Recurrent Neural Network (RNN)

• The input layer ‘x’ takes in the input to the neural network and processes it and passes it onto the middle
layer.
• The middle layer ‘h’ can consist of multiple hidden layers, each with its own activation functions and weights
and biases. If you have a neural network where the various parameters of different hidden layers are not
affected by the previous layer, ie: the neural network does not have memory, then you can use a recurrent
neural network.
• The Recurrent Neural Network will standardize the different activation functions and weights and biases so
that each hidden layer has the same parameters. Then, instead of creating multiple hidden layers, it will create
one and loop over it as many times as required.
Fundamentals of Deep networks and Defining Deep learning
Type of Recurrent Neural Network (RNN)
Fundamentals of Deep networks and Defining Deep learning
Generative Adversarial Networks GAN
• The main focus for GAN (Generative Adversarial Networks) is to generate data from scratch, mostly images but other
domains including music.

• Just like the example below, it generates a zebra from a horse. In reinforcement learning, it helps a robot to learn
much faster.
Fundamentals of Deep networks and Defining Deep learning
Generative Adversarial Networks GAN
Generator and discriminator

• GAN composes of two deep networks, the generator, and the discriminator.
• We will first look into how a generator creates images before learning how to train it.
•Generator. Model that is used to generate new plausible examples from the problem domain.
•Discriminator. Model that is used to classify examples as real (from the domain) or fake (generated).
• First, we sample some noise z using a normal or uniform distribution. With z as an input, we use a
generator G to create an image x (x=G(z)).
Fundamentals of Deep networks and Defining Deep learning
Generative Adversarial Networks GAN

• z represents the latent features of the images generated, for example, the colour and the shape.

• In Deep learning classification, we don’t control the features the model is learning.

• Similarly, in GAN, we don’t control the semantic meaning of z.

• We let the training process to learn it. i.e. we do not control which byte in z determines the color

of the hair.

• To discover its meaning, the most effective way is to plot the generated images and examine

ourselves.
Fundamentals of Deep networks and Defining Deep learning
Generative Adversarial Networks GAN
So what is this magic generator GAN?

• The following is the DCGAN(Deep Convolutional Generative Adversarial Networks) which is one of the most popular

designs for the generator network.

• It performs multiple transposed convolutions to up sample z to generate the image x.

• We can view it as the deep learning classifier in the reverse direction.


Fundamentals of Deep networks and Defining Deep learning
Generative Adversarial Networks GAN

• But a generator alone will just create random noise.

• Conceptually, the discriminator in GAN provides guidance to the generator on what images to create.

• Let’s consider a GAN’s application, CycleGAN, that uses a generator to convert real scenery into a Monet style painting.
Fundamentals of Deep networks and Defining Deep learning
The Generator Model
• The generator model takes a fixed-length random vector as input and generates a sample in the domain.

• The vector is drawn from randomly from a Gaussian distribution, and the vector is used to seed the

generative process.

• After training, points in this multidimensional vector space will correspond to points in the problem domain,

forming a compressed representation of the data distribution.

• After training, the generator model is kept and used to generate new samples.
Fundamentals of Deep networks and Defining Deep learning
The Discriminator Model
• The discriminator model takes an example from the domain as input (real or generated) and predicts a binary
class label of real or fake (generated).
• The real example comes from the training dataset. The generated examples are output by the generator
model.
• The discriminator is a normal (and well-understood) classification model.
• After the training process, the discriminator model is discarded as we are interested in the generator.
Fundamentals of Deep networks and Defining Deep learning
The Working of GAN Model

You might also like