Chiranjeev007/CIFAR-10_Subset
Viewer • Updated • 6.5k • 51
This model is a ResNet-18 trained on the CIFAR-10 subset dataset.
import torch
from torchvision import models
from huggingface_hub import hf_hub_download
# Load model
model = models.resnet18(pretrained=False)
model.fc = torch.nn.Linear(model.fc.in_features, 10)
# Download weights
model_path = hf_hub_download(repo_id="priyadip/cifar10-resnet18-m25csa023", filename="best_model.pth")
checkpoint = torch.load(model_path, map_location='cpu')
model.load_state_dict(checkpoint['model_state_dict'])
model.eval()