xiaozirui GitHub avatar

resnet18-gradcam-cifar10

xiaozirui

A PyTorch implementation of ResNet-18 from scratch for CIFAR-10 classification, including training, validation, and metric visualization, with Grad-CAM planned but not yet implemented.

Stars

5

7-day growth

No data

Forks

0

Open issues

0

License

MIT

Last updated

2026-07-29

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

Manually builds ResNet-18 using basic residual blocks rather than relying on torchvision.models, and adapts the stem layer for 32x32 inputs by removing the initial max pooling, making it an educational reference for understanding ResNet architecture.

Who it is for

  • Deep learning beginners learning CNN architecture implementation
  • PyTorch users seeking a clean CIFAR-10 classification baseline
  • Students or researchers interested in Grad-CAM visualization extensions

Use cases

  • Educational study of ResNet-18 internal structure
  • Training a classification model on CIFAR-10 from scratch
  • Baseline for comparing custom image classification experiments
  • Foundation for adding Grad-CAM or other interpretability methods

Strengths

  • Fully manual implementation without torchvision dependency, enhancing learning
  • Tailored stem design (3x3 conv, stride 1, no pooling) for small 32x32 CIFAR-10 images
  • Automatic device selection (CUDA, MPS, CPU) and best model checkpointing
  • Includes training/validation loss and accuracy curve visualization

Considerations

  • Grad-CAM visualization is listed as a plan and not yet implemented
  • Only supports CIFAR-10; no built-in adaption for other datasets
  • Training hyperparameters (batch 128, 20 epochs, SGD with cosine annealing) are fixed and may require tuning
  • No pretrained weights provided; full training from scratch is required

README quick start

使用说明

Description

PyTorch ResNet-18 implementation with Grad-CAM visualization on CIFAR-10

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine Learning
1,482