Views
No views yet
1import torch
2from pathlib import Path
3
4# Download the model
5model_path = "model.pt"
6state_dict = torch.load(model_path)
7
8# Load into your ConvNet architecture
9# (you'll need to define the ConvNet class from the training script)
10model = ConvNet()
11model.load_state_dict(state_dict)
12model.eval()
13
14# Make predictions
15with torch.no_grad():
16 predictions = model(images)