GitPedia

Pytorch cifar10

pytorch and cifar10

From soapisnotfat·Updated January 26, 2026·View on GitHub·

Personal practice on CIFAR10 with PyTorch Inspired by [pytorch-cifar](https://github.com/kuangliu/pytorch-cifar) by [kuangliu](https://github.com/kuangliu). The project is written primarily in Python, distributed under the Apache License 2.0 license, first published in 2017. Key topics include: alexnet, cifar-10, densenet, googlenet, lenet.

pytorch-cifar10

Personal practice on CIFAR10 with PyTorch <br>
Inspired by pytorch-cifar by kuangliu.

Introduction

The CIFAR-10 dataset consists of 60000 32x32 colour images in 10 classes, with 6000 images per class.
There are 50000 training images and 10000 test images.

The dataset is divided into five training batches and one test batch, each with 10000 images.
The test batch contains exactly 1000 randomly-selected images from each class.
The training batches contain the remaining images in random order, but some training batches may contain more images from one class than another.
Between them, the training batches contain exactly 5000 images from each class.

Requirement

  • python3.6
  • numpy
  • pytorch 0.4.0
  • torchvision 0.2.0

Usage

bash
python3 main.py

optional arguments:

--lr                default=1e-3    learning rate
--epoch             default=200     number of epochs tp train for
--trainBatchSize    default=100     training batch size
--testBatchSize     default=100     test batch size

Configs

200 epochs for each run-through, <br>
500 batches for each training epoch, <br>
100 batches for each validating epoch, <br>
100 images for each training and validating batch

Learning Rate

1e-3 for [1,74] epochs <br>
5e-4 for [75,149] epochs <br>
2.5e-4 for [150,200) epochs <br>

Result

ModelsAccuracyComments
LeNet67.52%- - - -
Alexnet74.74%Result is far away from my expectation (5%+). Reasons might be inappropriate modification to fit dataset(32x32 images).
VGG1187.48%- - - -
VGG1390.17%- - - -
VGG16TBD- - - -
VGG19TBD- - - -
GoogleNet92.57%- - - -
ResNet18TBD- - - -
ResNet34TBD- - - -
ResNet50TBD- - - -
ResNet101TBD- - - -
ResNet152TBD- - - -
DenseNet121TBD- - - -
DenseNet161TBD- - - -
DenseNet169TBD- - - -
DenseNet201TBD- - - -

Contributors

Showing top 1 contributor by commit count.

View all contributors on GitHub →

This article is auto-generated from soapisnotfat/pytorch-cifar10 via the GitHub API.Last fetched: 6/20/2026