An open API service indexing awesome lists of open source software.

https://github.com/wiseodd/bayesian_ood_training


https://github.com/wiseodd/bayesian_ood_training

Last synced: about 1 month ago
JSON representation

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}
}
```