Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

PyTorch implementation of residual networks trained on CIFAR-10 dataset (2017)

Notifications You must be signed in to change notification settings

KellerJordan/ResNet-PyTorch-CIFAR10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTorch-ResNet-CIFAR10

This is a PyTorch implementation of Residual Networks as described in the paper Deep Residual Learning for Image Recognition by Microsoft Research Asia. It is designed for the CIFAR-10 image classification task, following the ResNet architecture described on page 7 of the paper. This version allows use of dropout, arbitrary value of n, and a custom residual projection option.

Motivation

I completed this project in order to gain a better understanding of residual connections, which inspire the design of many state-of-the-art convnets at the present moment, as well as the gradient degradation problem. Having my own custom implementation made it easier to experiment with dropout and custom projection methods, and gave me practice with PyTorch.

Usage

To train the network, use the following command:

python main.py [-n=7] [--res-option='B'] [--use-dropout]

Default Hyperparameters

Hyperparameter Default Value Description
n 5 parameter controlling depth of network given structure described in paper
res_option A projection method when number of residual channels increases
batch_size 128 -
weight_decay 0.0001 -
use_dropout False -

Results

Using n=9 with otherwise default hyperparameters, the network achieves a test accuracy of 91.69%. This is somewhat lower than the result reported in the paper, likely because I used fewer training iterations due to compute limitations.

About

PyTorch implementation of residual networks trained on CIFAR-10 dataset (2017)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages