CoolFace
Modelpublic

aijadugar/cifar-10-resnet18

sourceHugging Facemitupdated 2mo agoView on Hugging Face
0likes14downloads
Model Card

license: mit language:

  • —en libraryname: pytorch pipelinetag: image-classification tags:
  • —pytorch
  • —resnet18
  • —cnn
  • —cifar10
  • —image-classification
  • —computer-vision datasets:
  • —cifar10 ---

ResNet-18 on CIFAR-10

A PyTorch implementation of ResNet-18 trained from scratch on the CIFAR-10 dataset.

Model Details

  • —Architecture: ResNet-18
  • —Framework: PyTorch
  • —Dataset: CIFAR-10
  • —Input Size: 3 × 32 × 32
  • —Classes: 10

CIFAR-10 Classes

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

Training

  • —Optimizer: SGD
  • —Learning Rate: 0.1
  • —Momentum: 0.9
  • —Weight Decay: 5e-4
  • —Scheduler: StepLR
  • —Loss: CrossEntropyLoss
  • —Epochs: 30
  • —Batch Size: 128

Performance

MetricValue
Test Accuracy89.61%

Model Files

  • —resnet18_cifar10.pth

Load Model

python
model = ResNet18()

model.load_state_dict(
    torch.load("resnet18_cifar10.pth")
)

model.eval()

Inference

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

Author

Ankit Bari

  • —GitHub: https://github.com/aijadugar
  • —Hugging Face: https://huggingface.co/aijadugar