ResNet-18 for Tiny ImageNet

This is a ResNet-18 model fine-tuned on the Tiny ImageNet dataset.

Model Description

This model is a torchvision.models.resnet18 model with the final fully connected layer replaced to classify the 200 classes of the Tiny ImageNet dataset.

Training Data

The model was trained on the Tiny ImageNet dataset, which consists of 200 classes, each with 500 training images and 50 validation images. All images are 64x64 colored images.

Training Procedure

The model was trained for 10 epochs using the following hyperparameters:

  • Optimizer: SGD with momentum=0.9
  • Learning Rate: 0.001
  • Batch Size: 128
  • Loss Function: Cross-Entropy Loss

The training was logged using Weights & Biases. You can find the training metrics here.

How to Use

To use this model, you can load it using PyTorch:

import torch
from torchvision import models

# Initialize the model architecture
model = models.resnet18(weights=None)
num_ftrs = model.fc.in_features
model.fc = torch.nn.Linear(num_ftrs, 200)

# Load the fine-tuned weights from the Hub
# Note: You can also download the 'pytorch_model.bin' file manually
from huggingface_hub import hf_hub_download
model_weights = hf_hub_download(repo_id="chershilhyde/resnet18-tiny-imagenet", filename="pytorch_model.bin")
model.load_state_dict(torch.load(model_weights))
model.eval()
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