Downloads · 30 days
35
11% of all-time downloads
Tudorx95/resnet18-cifar10
resnet18-cifar10 is a image classification model from Tudorx95. Use it when you need a label for an image. It is set up for pytorch.
Model ResNet18 adaptat si antrenat pe CIFAR-10.
Downloads · 30 days
35
11% of all-time downloads
All-time downloads
320
Public
Repo size
361 MB
Likes
0
Public
Click a slice to open those files.
.pth224 MB · 62%
From the Hugging Face model README
Model ResNet18 adaptat si antrenat pe CIFAR-10.
| Metrica | Valoare |
|---|---|
| Accuracy | 0.8763 |
| Precision | 0.8772 |
| Recall | 0.8763 |
| F1-Score | 0.8757 |
# In template, seteaza:
HUGGINGFACE_REPO_ID = "Tudorx95/resnet18-cifar10"
MODEL_FILENAME = "ResNet18_CIFAR10.pth"
# Modelul se incarca automat in create_model()
import torch
# Incarca modelul complet
model = torch.load('ResNet18_CIFAR10.pth', map_location='cpu')
model.eval()
# Sau incarca doar weights
from torchvision.models import resnet18
model = resnet18(weights=None)
model.conv1 = torch.nn.Conv2d(3, 64, kernel_size=3, stride=1, padding=1, bias=False)
model.maxpool = torch.nn.Identity()
model.fc = torch.nn.Linear(512, 10)
model.load_state_dict(torch.load('resnet18_cifar10_weights.pth'))
0: airplane, 1: automobile, 2: bird, 3: cat, 4: deer, 5: dog, 6: frog, 7: horse, 8: ship, 9: truck