Views
No views yet
best_model.pth - Best performing checkpoint (68.52% Acc@1)final_model.pth - Final model after all epochscheckpoint_epoch_X.pth - Saved every 20 epochs1import torch
2import torch.nn as nn
3from functools import partial
4
5# Use pvt-tiny configuration
6
7# Load model
8model = pvt_tiny(num_classes=100)
9
10# Load trained weights
11checkpoint = torch.load('best_model.pth')
12model.load_state_dict(checkpoint['model_state_dict'])
13model.eval()1@inproceedings{wang2021pyramid,
2 title={Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions},
3 author={Wang, Wenhai and Xie, Enze and Li, Xiang and Fan, Deng-Ping and Song, Kaitao and Liang, Ding and Lu, Tong and Luo, Ping and Shao, Ling},
4 booktitle={ICCV},
5 year={2021}
6}