Lab 1 β€” ResNet-18 on CIFAR-10

Submission branch: s_109197_103216. Fine-tuned ImageNet ResNet-18 in Google Colab; only layer4 and fc are updated.

The learning rate and epoch are selected by validation accuracy. The test split is used only after model selection. Seed: 42. Samples: train=10000, validation=2000, test=2000. Validation accuracy: 0.8905; test accuracy: 0.8815.

Classes: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck. This model recognizes these ten classes and does not detect out-of-distribution images. CIFAR-10 consists of small 32x32 images, so predictions on arbitrary photographs may be unreliable.

Weights use safetensors. config.json records labels and preprocessing; model.py contains the loader and inference function. eval/ contains the full per-class metrics, confusion matrix, test predictions and experiment summary.

from huggingface_hub import snapshot_download
from PIL import Image
from model import load_classifier, classify  # model.py from this repository

directory = snapshot_download("Springman/lab1-cifar10")
model, config = load_classifier(directory)
print(classify(model, config, Image.open("example.png"), top_k=3))
Downloads last month
4,628
Safetensors
Model size
11.2M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train Springman/lab1-cifar10

Space using Springman/lab1-cifar10 1