Views
No views yet
state_dict_emamodel.safetensors1import torch
2from timm.models import create_model
3
4# Run from the ThinkingViT repository root, or put this repository on PYTHONPATH.
5model = create_model("hf-hub:NCPS/thinkingvit_deit-3h-6h-800epochs-imagenet1k", pretrained=True)
6model.eval()
7
8x = torch.randn(1, 3, 224, 224)
9with torch.no_grad():
10 logits, stage = model(x, threshold=1.0)
11print(logits.shape, stage)| Threshold | Acc@1 (%) | GMACs |
|---|---|---|
| 0.0 | 81.850 | 5.850 |
| 0.1 | 81.848 | 5.385 |
| 0.2 | 81.846 | 4.751 |
| 0.3 | 81.832 | 4.363 |
| 0.5 | 81.758 | 3.841 |
| 0.8 | 81.386 | 3.189 |
| 1.0 | 80.636 | 2.781 |
| 1.2 | 79.764 | 2.433 |
| 1.4 | 78.846 | 2.136 |
| 1.6 | 77.688 | 1.865 |
| 2.0 | 75.500 | 1.417 |
| 5.0 | 74.514 | 1.250 |
| 10.0 | 74.514 | 1.250 |