AlexNet β€” Imagenette (320px)

A from-scratch AlexNet implementation trained on the Imagenette 320px dataset (10 classes, ~9.5k training images).

Trained as a learning project to understand classic CNN architectures end-to-end β€” data loading, training loop, mixed precision, evaluation, and deployment.

Results

Metric Value
Test accuracy 79.09%
Best validation accuracy 79.53%
Training epochs 30
Optimizer SGD (lr=0.01, momentum=0.9, weight_decay=5e-4)
LR schedule StepLR (step_size=15, gamma=0.1)
Hardware Kaggle T4 GPU
Mixed precision FP16 (AMP)
Training time ~25-30 min

Model architecture

Standard AlexNet, modified for 320Γ—320 input:

Layer Type In β†’ Out Kernel / Stride / Padding
1 Conv2d 3 β†’ 64 11Γ—11 / 4 / 2
ReLU + MaxPool2d 3Γ—3 / 2
2 Conv2d 64 β†’ 192 5Γ—5 / 1 / 2
ReLU + MaxPool2d 3Γ—3 / 2
3 Conv2d 192 β†’ 384 3Γ—3 / 1 / 1
ReLU
4 Conv2d 384 β†’ 256 3Γ—3 / 1 / 1
ReLU
5 Conv2d 256 β†’ 256 3Γ—3 / 1 / 1
ReLU + MaxPool2d 3Γ—3 / 2
Flatten 256Γ—5Γ—5 β†’ 6400
6 Linear + Dropout(0.5) + ReLU 6400 β†’ 4096
7 Linear + Dropout(0.5) + ReLU 4096 β†’ 4096
8 Linear 4096 β†’ 10

Classes

tench, english springer, cassette player, chain saw, church, french horn, garbage truck, gas pump, golf ball, parachute

Usage

Load weights

from huggingface_hub import hf_hub_download
import torch

weights_path = hf_hub_download(
    repo_id="lazy-toad/alexnet-imagenette",
    filename="alexnet_imagenette.pt",
)
state_dict = torch.load(weights_path, map_location="cpu")
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support