This repo is the official source code of NeurIPS-2023 paper:
To Stay or Not to Stay in the Pre-train Basin: Insights on Ensembling in Transfer Learning
By Ildus Sadrtdinov*,
Dmitrii Pozdeev*,
Dmitry Vetrov,
Ekaterina Lobacheva
arXiv / OpenReview / Poster & video
The project requirements are listed in requirements.txt
file. To create a pip/conda environment:
# using pip
pip install -r requirements.txt
# using Conda
conda create --name ens_for_transfer --file requirements.txt
Note:
- As during fine-tuning the images are resized to
224x224
and givenbatch_size=256
, training requires a GPU with at least 32 Gb memory, e.g., NVIDIA V100/A100. - Logging is done with the
wandb
library, so make sure to log in before launching the experiments.
To see the configuration files and parameters for different training setups, refer to the configs/
directory.
- BYOL ResNet-50 ImageNet pre-trained checkpoints are available here
- Supervised ResNet-50 ImageNet checkpoints pre-trained by Asukha et al, 2020
- Supervised Swin-Tiny ImageNet pre-trained checkpoints are available here
Scripts for launching experiments are located in the scripts/
directory. For example, to launch experiments for BYOL ResNet-50 setup, run the following commands:
- For training baselines (Local DE and Global DE)
python scripts/byol/byol_baseline.py
- For training SSE with different cycle hyperparameters
python scripts/byol/byol_sse.py
- For training StarSSE with different cycle hyperparameters
python scripts/byol/byol_starsse.py
If you found this code useful, please cite our paper:
@inproceedings{sadrtdinov2023to,
title={To Stay or Not to Stay in the Pre-train Basin: Insights on Ensembling in Transfer Learning},
author={Ildus Sadrtdinov and Dmitrii Pozdeev and Dmitry P. Vetrov and Ekaterina Lobacheva},
booktitle={Thirty-seventh Conference on Neural Information Processing Systems (NeurIPS)},
year={2023},
}