0% found this document useful (0 votes)
121 views15 pages

Comparison and Architecture of Pre-Trained Model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception - by Muhammad Abdullah - Medium

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)
121 views15 pages

Comparison and Architecture of Pre-Trained Model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception - by Muhammad Abdullah - Medium

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
You are on page 1/ 15

6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

Get unlimited access to the best of Medium for less than $1/week. Become a member

Comparison and Architecture of


pre-trained model (VGG-16, VGG-19,
ResNet, GoogleNet, AlexNet,
Inception
Muhammad Abdullah · Follow
5 min read · Oct 22, 2023

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 1/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

Open in app

3
Search Write
Pre-trained models have become a staple in the field of deep learning,
achieving state-of-the-art results on a wide range of tasks. These models are
trained on massive datasets, such as ImageNet, and can then be fine-tuned
for specific applications. By leveraging the knowledge learned from these
massive datasets, pre-trained models can significantly improve the
performance of deep learning models on smaller datasets.

In this article, we will discuss the architectures of several popular pre-


trained models:

VGG-16 and VGG-19

ResNet

GoogleNet

AlexNet

Inception

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 2/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

VGG-16 and VGG-19

VGG-16 and VGG-19 are deep convolutional neural networks (CNNs)


developed by the Visual Geometry Group (VGG) at the University of Oxford.
These models are characterized by their use of small 3x3 convolutional
filters stacked in succession. VGG-16 consists of 16 layers, while VGG-19
consists of 19 layers.

The architecture of VGG-16 and VGG-19 is relatively straightforward. Each


layer consists of a convolutional layer followed by a max-pooling layer. The
convolutional layers use 3x3 filters with a stride of 1 and padding of 1. The
max-pooling layers use 2x2 filters with a stride of 2.

The main difference between VGG-16 and VGG-19 is the number of


convolutional layers in each block. VGG-16 has two convolutional layers in
each block, while VGG-19 has three convolutional layers in each block.

VGG-16 Architecture

Input -> Conv3–64 -> MaxPool -> Conv3–128 -> MaxPool -> Conv3–256 ->
Conv3–256 -> MaxPool -> Conv3–512 -> Conv3–512 -> MaxPool -> Conv3–512 -
> Conv3–512 -> MaxPool -> FC-4096 -> FC-4096 -> FC-1000 -> Output

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 3/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

VGG-16 Architecture

VGG-19 Architecture

Input -> Conv3–64 -> MaxPool -> Conv3–128 -> Conv3–128 -> MaxPool ->
Conv3–256 -> Conv3–256 -> Conv3–256 -> MaxPool -> Conv3–512 -> Conv3–
512 -> Conv3–512 -> MaxPool -> Conv3–512 -> Conv3–512 -> Conv3–512 ->
MaxPool -> FC-4096 -> FC-4096 -> FC-1000 -> Output

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 4/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

VGG-19 Architecture

ResNet

ResNet is a family of CNNs developed by He et al. (2016). ResNets are


characterized by their use of residual connections, which allow the network
to learn long-range dependencies. Residual connections are implemented by
adding the output of a convolutional layer to its input.

The architecture of ResNet consists of a series of residual blocks. Each


residual block consists of two convolutional layers and a shortcut
connection. The shortcut connection adds the input of the residual block to
the output of the second convolutional layer.

The use of residual connections allows ResNets to learn long-range


dependencies. This is because the shortcut connection allows information to
flow directly from the input of the residual block to the output of the residual
block. This can help to alleviate the vanishing gradient problem, which can
occur in deep neural networks.

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 5/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

ResNet-50 Architecture

Input -> Conv1 -> BatchNorm -> ReLU -> MaxPool -> Conv2_x -> BatchNorm -
> ReLU -> Conv2_x -> BatchNorm -> ReLU -> Conv2_x -> BatchNorm -> ReLU
-> MaxPool -> Conv3_x -> BatchNorm -> ReLU -> Conv3_x -> BatchNorm ->
ReLU -> Conv3_x -> BatchNorm -> ReLU -> MaxPool -> Conv4_x ->
BatchNorm -> ReLU -> Conv4_x -> BatchNorm -> ReLU -> Conv4_x ->
BatchNorm -> ReLU -> MaxPool -> Conv5_x -> BatchNorm -> ReLU ->
Conv5_x -> BatchNorm -> ReLU -> Conv5_x -> BatchNorm -> ReLU -> AvgPool
-> FC-1000 -> Output.

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 6/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 7/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

ResNet-50 Architecture

GoogleNet

GoogleNet is a CNN developed by Szegedy et al. (2014). GoogleNet is


characterized by its use of inception modules, which are blocks of
convolutional filters with different sizes. Inception modules allow the
network to learn features at different scales.

The architecture of GoogleNet consists of a series of inception modules.


Each inception module consists of several convolutional filters with different
kernel sizes. The output of the convolutional filters is concatenated along the
channel dimension.

GoogleNet Architecture

Input -> Inception Module 1 -> Inception Module 2 -> Inception Module 3 ->
Inception Module 4 -> Inception Module 5 -> AvgPool -> FC-1000 -> Output

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 8/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

AlexNet

AlexNet is a CNN developed by Krizhevsky et al. (2012). AlexNet was the first
CNN to win the ImageNet Large Scale Visual Recognition Challenge
(ILSVRC). AlexNet is a relatively shallow network, with only 8 layers.

The architecture of AlexNet consists of five convolutional layers, three fully


connected layers, and a softmax layer. The convolutional layers use filters
with sizes of 11x11, 5x5, and 3x3. The fully connected layers have 4096, 4096,
and 1000 units.

AlexNet Architecture

Input -> Conv1 -> MaxPool -> Conv2 -> MaxPool -> Conv3 -> Conv4 -> Conv5 -
> MaxPool -> FC-4096 -> FC-4096 -> FC-1000 -> Output

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 9/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

Inception

Inception is a family of CNNs developed by Szegedy et al. (2014). Inception


models are characterized by their use of inception modules, which are
blocks of convolutional filters with different sizes. Inception models have
been shown to be very effective for image classification, and they have won
several image recognition competitions.

The architecture of Inception models consists of a series of inception


modules. Each inception module consists of several convolutional filters
with different kernel sizes. The output of the convolutional filters is
concatenated along the channel dimension.

The use of inception modules allows Inception models to learn features at


different scales. This is because the convolutional filters with different
kernel sizes are able to capture features at different scales.

Inception v3 Architecture

Input -> Conv3–64 -> MaxPool -> Conv3–192 -> MaxPool -> Inception Module
3a -> Inception Module 3b -> Inception Module 4a -> Inception Module 4b ->
Inception Module 4c -> Inception Module 5a -> Inception Module 5b ->
AvgPool -> FC-1000 -> Output

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 10/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

Conclusion

The architectures of pre-trained models vary widely. However, they all share
the common goal of learning features from data. By understanding the
architectures of pre-trained models, you can better understand how they
work and how they can be used to solve a wide range of tasks.

Deep Learning Pre Trained Model Vgg16 Vgg19 Resnet

Written by Muhammad Abdullah Follow

6 Followers

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 11/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

More from Muhammad Abdullah

Muhammad Abdullah Muhammad Abdullah

YOLO Working principle, difference Comparison and Architecture of


between its ddifferent Variants an… LSTM, GRU and RNN.
Working Principle of YOLO v8: Comparison and Architecture of LSTM, GRU,
and RNN:

4 min read · Oct 9, 2023 3 min read · Oct 22, 2023

3 51

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 12/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

Muhammad Abdullah Muhammad Abdullah

Voice Classification Using MFCC Integration of Deep Learning


Features and DNN models with django
Voice classification is the task of identifying Integrating NLP Models with Django using
the speaker of a voice recording. This has a… Joblib: A Step-by-Step Guide

4 min read · Dec 3, 2023 4 min read · Nov 26, 2023

53

See all from Muhammad Abdullah

Recommended from Medium

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 13/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

Mehmet Burak KARABULUT Bragadeesh Sundararajan

Unveiling the Power of Decoding ResNet: Revolutionizing


ResNet101v2: A Deep Dive into… Deep Learning Architectures
In this article, we will explore the intricacies of In the dynamic world of machine learning and
ResNet101v2, shedding light on what it is, ho… artificial intelligence, the evolution of deep…

3 min read · Dec 18, 2023 · 10 min read · Jan 21, 2024

100 4

Lists

Natural Language Processing Practical Guides to Machine


1498 stories · 1016 saves Learning
10 stories · 1518 saves

data science and AI Staff Picks


40 stories · 175 saves 656 stories · 1025 saves

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 14/15
6/9/24, 3:09 AM Comparison and Architecture of pre-trained model (VGG-16, VGG-19, ResNet, GoogleNet, AlexNet, Inception | by Muhammad Abd…

Tannaz Mostafid Mukhriddin Malik

Overview of VGG16, ResNet50, Top 5 CNN


Xception and MobileNet Neural… Architectures(GoogleNet,ResNet,…
Introduction Fully explained with different versions

4 min read · Dec 11, 2023 8 min read · Jan 9, 2024

33 61

Sandaruwan He… in Data Science and Machine Le… Saba Hesaraki

VGG Xception
In the world of CNNs (convolutional neural Xception, an abbreviation for “Extreme
networks), just like AlexNet is considered a… Inception,” represents a milestone in…

4 min read · Dec 31, 2023 2 min read · Dec 29, 2023

See more recommendations

https://medium.com/@muhabd51/comparison-and-architecture-of-pre-trained-model-vgg-16-vgg-19-resnet-googlenet-alexnet-0fb459fff368 15/15

You might also like