Deep Learning UNIT-1 Deep Learning: Fundamentals: Long Answer Questions

 UNIT-1

Deep Learning: Fundamentals

Long Answer Questions

-----------------------------------------------------------------------------------------------------------------------------

1.     Explain Artificial Neural Network with example.

2.     List the different applications of Artificial Neural Network.

3.     Explain Building Block of Neural Networks with an example.

4.     Discuss Multi-Layer Perceptron (MLP) with an example.

5.     Identify the different layers in ANN. Explain them.

6.     Explain Forward Pass.

7.     Explain Backward Pass.

8.     Explain back propagation algorithm with an example.

9.     List the different optimizers. Explain them.

10.  What is the vanishing and exploding gradient problems? How to overcome those problems. Explain.

11.  List the difficulties in convergence. How to achieve convergence? Explain.

12.  Explain Preprocessing.

13.  Explain Momentum.

14.  What is Learning Rate Decay? Explain.

15.  What is the purpose of weight initialization? Explain.

16.  What is the purpose of Regularization? Explain different techniques of Regularization.

17.  Explain Dropout with example.

18.  Explain softmax activation function with example.

19.  When we use cross entropy loss function? Explain.

20.  List the different activation functions. Explain them.

21.  How to train the neural network? Explain.

 

Deep Learning: UNIT- II: CNN : 7. CNN VS Fully Connected

 7. CNN vs Fully Connected

  • The basic difference between the two types of layers is the density of the connections. The FC layers are densely connected, meaning that every neuron in the output is connected to every input neuron. On the other hand, in a Conv layer, the neurons are not densely connected but are connected only to neighboring neurons within the width of the convolutional kernel.
  • A second main difference between them is weight sharing. In an FC layer, every output neuron is connected to every input neuron through a different weight . However, in a Conv layer, the weights are shared among different neurons. This is another characteristic that enables Conv layers to be used in the case of a large number of neurons.

The problems with MLP for Image Data?

a.      MLP will react differently to an image and its shifted version

b.     MLP doesnot consider Spatial relations

c.      Includes too many Parameters

 

a.     MLP will react differently to an image and its shifted version

  • Since MLP flattens the image, it is not positioning invariant
  • we fitted our image to ANN
  • Converted the image into a single feature vector,
  • hence not considering the neighbouring pixels, and
  • most importantly the Image channels (R-G-B)

Lets take an example

  • Supposedly we have two images of the same dog but at two different position
  • One on the Upper left while one on the middle right




  • Now since MLP will flatten the matrix, the neurons
    which might be more active for the first image will be dormant for the second one
  • Making MLP think these two images having completely different objects

b. MLP doesnot consider Spatial relations

  • Spatial Information (like if a Person is standing at the right side of the Car or The red car is on the left side of the blue bike) gets lost when image is flattened
  • Flattening also loses the internal representation of the 2D image.

c. Includes too many Parameters

  • Since MLP is a fully connected model, it requires a neuron for every input pixel of the image
  • Now Lets take an example with an image of size (1280 x 720) .
    • For an image with dimension as such the vector for the input layer becomes (921600 x 1). if a Dense layer of 128 is used then the number of parameters equals = 921600*128.
    • This makes MLP infeasible for large image and it may cause overfitting.

 

Do we even require global connectivity ?

  • The global connectivity caused due to densely connected neurons leads to more reduntant parameters which makes the MLP overfit

With all the above discussion we need:

  • to make the system translation (position) invariant
  • to leverage the spatial correlation between the pixels
  • focus only on the local connectivity

 

What should be the SPECIAL Features of CNN?

From the above discussion and taking inspiration from our visual cortex system, there are 3 essential properties of image data:

1. LOCALITY: Correlation between neighbouring pixels in a Image

2. STATIONARITY: Similar Patterns appearing multiple times in a Image

3. COMPOSITIONALITY: Extracting higher level features by pooling lower level features

 

 

 



Deep Learning: UNIT- II: CNN :6. CNN -Case study with MNIST

Deep Learning: UNIT- II: CNN: 5. Operations and prediction of CNN with layers

Deep Learning: UNIT- II: CNN: 4. structure

Deep Learning: UNIT -II: CNN : 3.pooling layers

 3. Pooling Layer

Apart from Conv2D, we also used another specific module called MaxPooling2D in our model, which had no learnable parameters.

Let's try to understand what is Pooling and what is the significance of a Pooling Module.

The pooling layer helps in reducing the height and width of the image. Thus, it helps in reducing the number of parameters and also make invariant to the position in the input. In other words, it induces "compositionality" in our model architecture.

There are two kinds of pooling :

  1. Max pooling : The filter of size (𝑓,𝑓)( is slided over the input with a stride and we take the maximum in that region. It is used in between the Conv Layers.
  2. Average pooling : The filter of size (𝑓,𝑓) is slided over the input with a sride and we take the average in that region. This type of pooling is generally used just before the Fully connected layers for feature extraction!

The above figure illustrates the max pooling using a filter (2,2) dimension and having a stride of 2.




The above figure illustrates the average pooling using a filter (2,2) dimension and having a stride of 2.

Does pooling layers add any learnable weights to the network?

  • No, since notice that no kernel/filter matrix is considered.
  • Hence no parameters are needed while computing pooling

What is the Output shape after pooling layer?

·      The output shape is given by: 



where n is the input size, f is the pooling filter size and s is the stride size.

 

How Pooling works in Keras?

layers.MaxPooling2D()

layers.AveragePooling2D()

Both these Pooling layers have 2 important arguments:

  1. pool_size: This is the size of the window on which pooling will be applied. By default this size is 2. Can be an integer or a tuple of 2 integers. It can also be thought of as a non-learnable filter which either calculates max over the region or average out the values.
  2. strides: This is same as the one in Conv2D layer. Default is None, which means that the stride size is same as the pool size.

 

Deep Learning: UNIT- II: CNN 2.striding and padding

About Machine Learning

Welcome! Your Hub for AI, Machine Learning, and Emerging Technologies In today’s rapidly evolving tech landscape, staying updated with the ...