Skip to content

Modeling ResNet-18 with CIFAR-10 Images. Images are downloaded from Kaggle Competition.

Notifications You must be signed in to change notification settings

Jungminii-1114/ResNet-18

Repository files navigation

ResNet-18 Implementation from Scratch with PyTorch

PyTorch Python

Project Overview

This repository contains a PyTorch implementation of the ResNet-18 architectures, constructed entierly from scratch based on the original paper "Deep Residual Learning for Image Recognition" (He et al., 2016).

Unlike simply calling torchvision.models.resnet18, the goal of this project was to:

  1. Deeply understand the residual learning framework and the vanishing gradient problem.
  2. Manually implement the detailed architecture, including Residual Blocks and Skip Connections.
  3. Train and validate the model on a custom dataset to verify its performance.

Paper Review & Key Concepts

The core idea of ResNet is to introduce a "shortcut connection" that skips one or more layers. This allows the network to fit a residual mapping $F(x)$ instead of the underlying mapping $H(x)$, making it easier to train very deep networks.

  • Residual Block : Implemented the basic building block of ResNet-18 containing two 3x3 convolutions with Batch Normalization(BN) and ReLU.
  • Skip Connection : Solved the degradation problem in deep networks by adding the input $x$ to the output of the stacked layers ($F(x) + x$).
  • Architectures:
    • Initial : 7x7 Conv, MaxPool
    • 4 Layers of Residual Blocks (64, 128, 256, 512 channels)
    • Final : Average Pool, Fully-Connected Layer

Due to the file size limit, the dataset files (train.tar, test.tar) are hosted on Google Drive. Please download them from the link below:

[Dataset Setup]

Since the dataset exceeds GitHub's file size limit, it is provided via Google Drive. Download train.tar and test.tar from the link below. Place the files in the dataset/ directory (or your project root). Unzip the files before running the code.

스크린샷 2026-01-14 14 36 49 스크린샷 2026-01-14 14 36 57

About

Modeling ResNet-18 with CIFAR-10 Images. Images are downloaded from Kaggle Competition.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors