MNIST Digit Classifier

A convolutional neural network trained on MNIST to classify digits 0-9.

Usage

from src.model import DigitClassifier
import torch

model = DigitClassifier()
model.load_state_dict(torch.load("model_weights.pth"))
model.eval()

# Preprocessing (same as training):
transform = transforms.Compose([
    transforms.Resize((28, 28)),
    transforms.Grayscale(),
    transforms.ToTensor(),
    transforms.Normalize((0.1307,), (0.3081,))
])
Downloads last month
28
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API: The HF Inference API does not support image-classification models for pytorch library.