https://github.com/wiseodd/bayesian_ood_training
https://github.com/wiseodd/bayesian_ood_training
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/wiseodd/bayesian_ood_training
- Owner: wiseodd
- Created: 2020-10-28T12:16:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-18T18:47:08.000Z (over 2 years ago)
- Last Synced: 2025-10-11T02:25:35.640Z (5 months ago)
- Language: Jupyter Notebook
- Size: 10.6 MB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bayesian OOD Training
Code for the AISTATS 2022 paper titled "Being a Bit Frequentist Improves Bayesian Neural Networks" by Agustinus Kristiadi, Matthias Hein, and Philipp Hennig.
## Setting up:
1. Run: `conda create --name ENV_NAME --file conda_env.txt`.
2. Then: `conda activate ENV_NAME`.
3. Install PyTorch and TorchVision ().
4. Set the dataset path in `util/dataloaders.py`, line 30 (`path = os.path.expanduser('~/Datasets')`).
5. Follow the instruction here to obtain the NLP datasets: .
## Reproducing the paper's results:
1. Model training: run `train.sh`, `train_nlp.sh`, and `train_aux.sh`.
2. Run `eval.sh` and `eval_nlp.sh` to gather experiments data.
3. Run `aggregate_*.py` to create the tables in the paper based on the previous data.
4. Run `plot_*.py` to create figures for dataset shift experiments.
## Citing the paper:
```
@inproceedings{kristiadi2022frequentist,
title={Being a Bit Frequentist Improves {B}ayesian Neural Networks},
author={Kristiadi, Agustinus and Hein, Matthias and Hennig, Philipp},
booktitle={AISTATS},
year={2022}
}
```