Skip to main content

How to conduct Hypothesis Testing step by step - simple and elegant (part 3)

Step by Step procedure in Conducting the Hypothesis Testing: prerequisites:   Part 1:  What is Hypothesis Testing and When it is Used? Part 2:  How to decide Null and Alternate Hypothesis?                    https://www.isixsigma.com/   Before diving into the steps, first let’s understand the Important Terminology we need to understand: Null Hypothesis: It is a well-established fact which is believed by all the people. It can also defined as an Assumption that treats everything equally and similarly. Alternate Hypothesis: It is a new claim made against the Null Hypothesis. If we have enough evidence against the Null Hypothesis we will reject Null Hypothesis. P-value: Probability of Null Hypothesis being true. Significance level: probability of rejecting the Null Hypothesis when it is true. It is a critical point where we decide whether the Null Hypothesis is rejected or not. ...

Simple Understanding of INCEPTION_V3 and it's Architecture (part 3)

INCEPTION_V3


Prerequisites: 

VGGNet OR VGG16: VGG16 Architecture 


By looking it's name, everybody think's that it is a complicated story just like the movie INCEPTION. But trust me, I will prove you that it is wrong by explaining in the most detailed way.

Till now, If we take a layer in any neural network we only applied single operation like convolution or maxpooling and also with fixed kernel size for the whole layer. 

But Now, The idea is, why can't we use all the operations in a single layer at a time. There comes INCEPTION_V3.

Lets zoom a single layer in the inception_v3,

source: It's a screenshot from AndrewNg class

If you observe the above figure, convolution operation with kernel sizes 1x1,3x3,5x5 and the max-pool operation, all have applied at a time.

Here comes a problem, COMPUTATION. only from single layer we are getting billions of computations. For example,

lets do a simple mathematical calculation here,
Note: To understand this you need to know how convolution operation works.

From the above fig, our input size is 28x28x192, Now we are going to convolve it with 5x5 kernel and remember that the number of channels must be same with our input. so our kernel size is 5x5x192 and our output size is 28x28x32.

Inorder to get a single pixel value in our output matrix, we need to do 5x5x192 numerical operations.
                   single pixel -> 5x5x192
                  (28x28x32) pixels -> ?
So, To get whole output we need to do (5x5x192) x (28x28x32)  operations. [120 billion operations approx] . 

OH MY GOD, WHAT SHALL WE DO NOW?

Inorder to decrease the number of operations, Google has came out with a hack. lets look into it.



The hack is simple, Instead of convolving directly with 5x5 kernel, First do with 1x1 kernel followed by 5x5 kernel.
Now lets see number of mathematical operations required to get our output.

Number of operations with 1x1 kernel : (1x1x192) x (28x28x16)
Number of operations with 5x5 kernel : (5x5x16) x (28x28x32)
                                                   Total   :  12 billion approx
WOW GREAT, our operations has decreased from 120 billion to 12 billion operations.

FINALLY, let's put together what we learnt till now.


INCEPTION IDEA + OPTIMIZATION WITH 1X1 KERNEL


Atlast, we able to do both convolution and maxpooling operations at a time with optimal number of numerical operations by including 1x1 kernel.

As we will have many layers like this in the whole INCEPTION architecture, lets look into the final figure.


                                         source: https://cdn.analyticsvidhya.com/wp-content/uploads/2018/10/googlenet.png

In order to get the clear picture please go to the source link below the image.

Advantages:
1. We are not compromising on which kernel size should we use in a layer.
2. We also not compromising at convolution and maxpool operations.
3. 1x1 kernel is using for getting optimal results.

Disadvantages:
As of now, I didn't find any disadvantages. If you have please comment below. 

THANKYOU ALL.

Following Blogs might be useful to you.
ALEXNET:                ALEXNET ARCHITECTURE
RESNET:                   RESNET ARCHITECTURE

If you have any queries, please comment below...
For more content please follow the blogpost...







 








Comments

Popular posts from this blog

How to conduct Hypothesis Testing step by step - simple and elegant (part 3)

Step by Step procedure in Conducting the Hypothesis Testing: prerequisites:   Part 1:  What is Hypothesis Testing and When it is Used? Part 2:  How to decide Null and Alternate Hypothesis?                    https://www.isixsigma.com/   Before diving into the steps, first let’s understand the Important Terminology we need to understand: Null Hypothesis: It is a well-established fact which is believed by all the people. It can also defined as an Assumption that treats everything equally and similarly. Alternate Hypothesis: It is a new claim made against the Null Hypothesis. If we have enough evidence against the Null Hypothesis we will reject Null Hypothesis. P-value: Probability of Null Hypothesis being true. Significance level: probability of rejecting the Null Hypothesis when it is true. It is a critical point where we decide whether the Null Hypothesis is rejected or not. ...

Simple Understanding of VGG16 and it's Architecture (part 2)

Vgg16 Architecture:   Prerequisites:  ALEXNet  :  ALEXNet Architecture   * vgg refers to visual geometry group who has developed vgg16 architecture. * 16 refers to number of layers. VGG16 or VGGNet is a convolution neural network and it is a simplified and better version of Alexnet. Remembering Alexnet architecture is very difficult, Later on 2014, vgg16 came as an architecture and it is very simple to remember. VGG16 is very simple where:  ·   It is built on Convolution operations with fixed kernel_size=(3x3), padding=’same’, and stride=1 for all Convolution layers. ·     And also Maxpooling operation with pool_size=(2x2) and stride=2 for all Maxpool layers.       Let's see the architecture of vgg16 source:https://qph.fs.quoracdn.net/main-qimg-e657c195fc2696c7d5fc0b1e3682fde6 If you observe the figure, As said all convolution layers have 3x3 kernels and all maxpool layers have size of 2x2. Note 1: For...