0% found this document useful (0 votes)
118 views4 pages

Resnet50 Summary

ResNet50 is a deep convolutional neural network architecture used for image classification. It uses skip connections to address the vanishing gradient problem in very deep networks. ResNet50 consists of 50 layers including convolutional, pooling, and residual blocks. Transfer learning is used to fine-tune a pre-trained ResNet50 model for a new task by reusing learned features and adjusting parameters.
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)
118 views4 pages

Resnet50 Summary

ResNet50 is a deep convolutional neural network architecture used for image classification. It uses skip connections to address the vanishing gradient problem in very deep networks. ResNet50 consists of 50 layers including convolutional, pooling, and residual blocks. Transfer learning is used to fine-tune a pre-trained ResNet50 model for a new task by reusing learned features and adjusting parameters.
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/ 4

RESNET50 SUMMARY

 ResNet-50 is based on a deep residual learning


framework that allows for the training of very deep
networks with hundreds of layers.

 The ResNet architecture was developed in response


to a surprising observation in deep learning
research: adding more layers to a neural network
was not always improving the results.

So one of the problems when using hundreds of layers in So this is the “Skip connections” that is used by ResNet50.
a deep neural network is the Vanishing Gradient These connections allowed the preservation of
Problem. information from earlier layers, which helped the
 Vanishing gradient problem is a phenomenon that network learn better representations of the input data.
occurs during the training of deep neural networks, With the ResNet architecture, they were able to train
where the gradients that are used to update the networks with as many as 152 layers.
network become extremely small or "vanish" as they
are backpropagated from the output layers to the
earlier layers. ResNet50 Architecture:

In simpler terms: The smaller the gradients are as your


dataset propagates backward through layers of your
neural network during the training process, the
adjustments of the parameters become negligible. Making
your model to learn very slowly or worse kay dili jud siya
maka learn. It won’t perform properly dayon during your
testing.

So this problem is “solved” by developing a model called The "50" in ResNet50 refers to the total number of layers
ResNet50 which uses Skip Connections. in the network. It consists of 50 layers in total.

Skip Connections is the process of adding the original  Input Layer – This layer takes the input image as an
input to the output of the convolutional block. In this input. In the case of ResNet50, the input image
way, dili ra kayo malayo ang output of hundreds of layers typically has dimensions of 224x224 pixels with three
sa imong original input. Mura siyag feedback loop. color channels (RGB).
 Convolutional Layer - ResNet50 starts with a series
of convolutional layers, which are responsible for
extracting features from the input image. This layer
captures various patterns and features such as edges,
textures, shapes, etc.
 Pooling Layers - After a few initial convolutional
layers, ResNet50 uses max pooling layers to reduce
the spatial dimensions of the feature maps.
 Residual Blocks - The core component of ResNet50
is the residual block. These blocks introduce skip
connections, which allow information to bypass one
So this is how dataset normally propagates from one
or more layers and propagate more directly through
convolutional layer to another. However, if we use
the network.
hundreds of layers, maka cause siya og vanishing
gradient problem.
 Fully Connected Layers - These fully connected
layers perform classification tasks, such as
identifying the object present in the input image.
 Output Layer - The output layer of ResNet50
typically uses a softmax activation function to
convert the raw output of the neural network into
probabilities for each class. The class with the
highest probability is considered the predicted
class for the input image.
Another ResNet50 Architecture Diagram:

Residual Blocks

Input Layer Convolutional


Layer

Fully Connected
Pooling Layers Layers
So in the case of training ResNet50 tuning para mag work og mayo imong OWN ResNet50
model.
with custom dataset:

The advantage of using Transfer Learning technique is


I used the Transfer Learning technique. This is a machine mas paspas ang training since you don’t have to start
learning technique where a model trained on one task is from scratch. Also, since pre-trained naman ang model it
reused as a starting point for a model on a different but reduces the computational resources needed to train a
related task. model.

Concept of Transfer Learning:

1. Pre-trained Model: a pre-trained model is used


as a starting point. This pre-trained model is
typically trained on a large dataset for a specific
task, such as image classification.

In my case, I used a pre-trained ResNet50 model


based on the Imagenet dataset with thousands of
images.

2. Reuse of Features: Instead of training a new


model from scratch, the pre-trained model is
used as a feature extractor. This means that the
learned representations (features) from the
earlier layers of the pre-trained model are
retained, while the final layers (responsible for
task-specific predictions) may be modified or
replaced.

3. Fine-Tuning: After using the pre-trained model


as a feature extractor, the model is fine-tuned on
the new task using a smaller dataset. During fine-
tuning, the parameters of the pre-trained model
are adjusted slightly to better fit the new task,
while still leveraging the knowledge gained from
the original task.

Code:

base_model: pre-trained ResNet50 model

so gi use lang ang mga first few layers sa pre-trained


model. Then nag add lang og layers sa last part like
GlobalAveragePooling2D and Dense layers that would
fit your OWN model. then ofcourse naa na diha ang fine-

You might also like