Skip to content

Latest commit

 

History

History

ResNet - Deep Residual Learning for Image Recognition

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Summary

As the number of layers in a deep neural network increases, training becomes increasingly more difficult.
This leads to issues such as vanishing gradients, accuracy degradation, and a longer training time.
Eventually, it led to the development of the ResNet, which allows deeper models having less susceptibility to these issues.

Maths Involved

Residual block maths
Here, x and y are the input and output vectors of the given layer.
F(x,{Wi}) represents the residual mapping to be learned.
Here, the dimensions of F and x should be the same so that they can be added; else, according conversions need to be done.
Residual block structure

Architecture Examples, and Results

The ResNet is not an architecture as such, but rather implements the residual module as shown above.
However, the authors of the paper did implement a few models using residual blocks and published their results for the same, evaluated on the ImageNet 2012 dataset that consists of 1000 classes.

The following image shows how one can implement residual blocks in a normal network, to retain the layers while increasing efficiency.
Normal network to Resnet

Here are some architectures using ResNets.
Other Architectures
They trained models of different numbers of layers (18, 34, 50, 101, 152 layers) and published the results in the original paper. This is a training curve of normal versus residual networks of same number of layers.

Training Graph

Here is a comparison of the results obtained in the paper, from implementing different models.

Results

Further Reading

You can find the original paper here.
Here is the link to a repo containing the PyTorch implementation.
Here is a link to a simple ResNet model I have implemented myself: Basic Image Classifier