Views
No views yet
1import torch
2from model import ResNet34 # You'll need the model definition
3
4# Load the model
5model = ResNet34(num_classes=100)
6checkpoint = torch.load('best_model.pth', map_location='cpu')
7model.load_state_dict(checkpoint['model_state_dict'])
8model.eval()
9
10# For inference, use the transforms from the training