Views
No views yet
best_model.pth - Best performing model (76.98% Acc@1)final_model.pth - Final model after 100 epochscheckpoint_epoch_X.pth - Saved every 20 epochs1import torch
2
3# Load model (copy model definition from notebook)
4model = vig_tiny(num_classes=100)
5
6# Load trained weights
7checkpoint = torch.load('best_model.pth')
8model.load_state_dict(checkpoint['model_state_dict'])
9model.eval()
10
11# Inference
12with torch.no_grad():
13 output = model(image_tensor)
14 probs = torch.softmax(output, dim=1)1@inproceedings{han2022vision,
2 title={Vision GNN: An Image is Worth Graph of Nodes},
3 author={Han, Kai and Wang, Yunhe and Guo, Jianyuan and Tang, Yehui and Wu, Enhua},
4 booktitle={NeurIPS},
5 year={2022}
6}