Views
No views yet
1import torch
2import timm
3
4# Load the model directly from the Hub
5model = timm.create_model(
6 'hf-hub:parlange/vit-gravit-s3',
7 pretrained=True
8)
9model.eval()
10
11# Example inference
12dummy_input = torch.randn(1, 3, 224, 224)
13with torch.no_grad():
14 output = model(dummy_input)
15 predictions = torch.softmax(output, dim=1)
16print(f"Lens probability: {predictions[0][1]:.4f}")| 🔧 Parameter | 📝 Value |
|---|---|
| Batch Size | 192 |
| Learning Rate | AdamW with ReduceLROnPlateau |
| Epochs | 100 |
| Patience | 10 |
| Optimizer | AdamW |
| Scheduler | ReduceLROnPlateau |
| Image Size | 224x224 |
| Fine Tune Mode | all_blocks |
| Stochastic Depth Probability | 0.1 |













| Metric | Value |
|---|---|
| 🎯 Average Accuracy | 0.8441 |
| 📈 Average AUC-ROC | 0.8757 |
| ⚖️ Average F1-Score | 0.5762 |
1@misc{parlange2025gravit,
2 title={GraViT: Transfer Learning with Vision Transformers and MLP-Mixer for Strong Gravitational Lens Discovery},
3 author={René Parlange and Juan C. Cuevas-Tello and Octavio Valenzuela and Omar de J. Cabrera-Rosas and Tomás Verdugo and Anupreeta More and Anton T. Jaelani},
4 year={2025},
5 eprint={2509.00226},
6 archivePrefix={arXiv},
7 primaryClass={cs.CV},
8 url={https://arxiv.org/abs/2509.00226},
9}