LeNet-5 on CIFAR-10

A PyTorch implementation of the classic LeNet-5 architecture trained on the CIFAR-10 dataset.

Model Details

  • Architecture: LeNet-5
  • Framework: PyTorch
  • Dataset: CIFAR-10
  • Input Size: 3 × 32 × 32
  • Classes: 10

CIFAR-10 Classes

Label Class
0 airplane
1 automobile
2 bird
3 cat
4 deer
5 dog
6 frog
7 horse
8 ship
9 truck

Training

  • Optimizer: Adam
  • Learning Rate: 1e-3
  • Loss Function: CrossEntropyLoss
  • Epochs: 20
  • Batch Size: 64

Performance

Metric Value
Test Accuracy 58.32%

Model Files

  • lenet5_cifar10.pth — Trained model weights

Load Model

import torch

model = LeNet5()
model.load_state_dict(torch.load("lenet5_cifar10.pth"))
model.eval()

Inference

with torch.no_grad():
    outputs = model(images)
    _, predicted = torch.max(outputs, 1)

Author

Ankit Bari


Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train aijadugar/cifar-10-lenet5